vvim / routetool

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

change Form::reorderMarkers() #38

Open vvim opened 8 years ago

vvim commented 8 years ago

see commit 9ee1c4ab35d95cbd15acd1599719ad6b06c8d539

This way, it will only run when necessary.

Then also, if we add a matrices_up_to_date = !testIfLWMarkersHasChanged(); we can change Form::on_pbShowTotalDistanceAndTotalTime_clicked() to simply

void Form::on_pbShowTotalDistanceAndTotalTime_clicked()
{
    reorderMarkers();
    setTotalDistanceAndTotalTime();
}