From: Mikko Rasa Date: Sat, 22 Mar 2014 08:49:09 +0000 (+0200) Subject: Only create a new highlight if the target actually changed X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=969be794066ccbfa0e68e69ba6cb60a2496e3679;p=r2c2.git Only create a new highlight if the target actually changed --- diff --git a/source/engineer/routerpanel.cpp b/source/engineer/routerpanel.cpp index 11056ea..1935bbe 100644 --- a/source/engineer/routerpanel.cpp +++ b/source/engineer/routerpanel.cpp @@ -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()); Ray ray = engineer.get_main_view().create_ray(rx, ry); Track *track = engineer.get_layout().pick(ray); - if(track) + if(track && &track->get_block()!=goto_target) { goto_target = &track->get_block(); delete goto_highlight;