From 9f4a4eae44cfbe146fd32b3015cd3b014673ed47 Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <koslowski@kit.edu>
Date: Fri, 11 Jul 2014 23:24:47 +0200
Subject: grc: toogle action to disable auto-hiding port labels

---
 grc/gui/FlowGraph.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'grc/gui/FlowGraph.py')

diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 2fb452fe2d..97707f0c5d 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -546,13 +546,15 @@ class FlowGraph(Element):
 
     def handle_mouse_motion(self, coordinate):
         """
-        The mouse has moved, respond to mouse dragging.
+        The mouse has moved, respond to mouse dragging or notify elements
         Move a selected element to the new coordinate.
         Auto-scroll the scroll bars at the boundaries.
         """
         #to perform a movement, the mouse must be pressed
         # (no longer checking pending events via gtk.events_pending() - always true in Windows)
         if not self.mouse_pressed:
+            # only continue if mouse-over stuff is enabled (just the auto-hide port label stuff for now)
+            if not Actions.TOGGLE_AUTO_HIDE_PORT_LABELS.get_active(): return
             redraw = False
             for element in reversed(self.get_elements()):
                 over_element = element.what_is_selected(coordinate)
-- 
cgit v1.2.3