From 969be794066ccbfa0e68e69ba6cb60a2496e3679 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 22 Mar 2014 10:49:09 +0200 Subject: [PATCH] Only create a new highlight if the target actually changed --- source/engineer/routerpanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.45.2