vvim / routetool

Using Google Maps API to add locations and calculate the shortest route by Traveling Salesman Algorithm
1 stars 0 forks source link

m_markers is a member from Form and DistanceMatrix #17

Open vvim opened 9 years ago

vvim commented 9 years ago

both classes Form and DistanceMatrix have a member called m_markers , but they are not always equal. Is this needed?

When you fire up the routetool, add 3 'ophaalpunten met aanmeldingen', and read out the m_markers.length() in form.cpp or distancematrix.cpp , the results are different.

logfile:

[ void Form::on_showOphaalpunten_clicked() ] start, size of m_markers is  4 
[ void DistanceMatrix::getOphaalpuntIdFromRoute() ] start, size of m_markers is  0 

Later, when you would caculate the optimal route, than DistanceMatrix gets involved and the result will be the same:

logfile:

[ void Form::on_showOphaalpunten_clicked() ] start, size of m_markers is  4 
[ void DistanceMatrix::getOphaalpuntIdFromRoute() ] start, size of m_markers is  4 
vvim commented 9 years ago

is this why Form has a boolean matrices_up_to_date ? To check if the distancematrix is the newest version (and accidentally also the m_markers list is up to date)?