]> git.tdb.fi Git - r2c2.git/commitdiff
Only create a new highlight if the target actually changed
authorMikko Rasa <tdb@tdb.fi>
Sat, 22 Mar 2014 08:49:09 +0000 (10:49 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 22 Mar 2014 14:20:52 +0000 (16:20 +0200)
source/engineer/routerpanel.cpp

index 11056ea85f28e578c58bbd20b1b65045b1fa669b..1935bbed1273d6525d5f7a64c4f6b7968c61ed40 100644 (file)
@@ -78,6 +78,7 @@ void RouterPanel::route_selected(unsigned index)
 void RouterPanel::goto_clicked()
 {
        goto_pick = true;
+       goto_target = 0;
        signal_grab_pointer.emit();
 }
 
@@ -109,7 +110,7 @@ void RouterPanel::pointer_motion(int x, int y)
                map_coords_to_ancestor(rx, ry, *find_ancestor<GLtk::Root>());
                Ray ray = engineer.get_main_view().create_ray(rx, ry);
                Track *track = engineer.get_layout().pick<Track>(ray);
-               if(track)
+               if(track && &track->get_block()!=goto_target)
                {
                        goto_target = &track->get_block();
                        delete goto_highlight;