From 8886123e78485e5c3d1edccaa35ce591e43dbbe5 Mon Sep 17 00:00:00 2001 From: Sebastian Koslowski <koslowski@kit.edu> Date: Wed, 20 Aug 2014 17:55:15 +0200 Subject: grc: toggle action and mod1 modifier for snap-to-grid --- grc/gui/ActionHandler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'grc/gui/ActionHandler.py') diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index b68fa60a26..dcc3c846eb 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -118,7 +118,7 @@ class ActionHandler: Actions.TYPES_WINDOW_DISPLAY, Actions.TOGGLE_BLOCKS_WINDOW, Actions.TOGGLE_REPORTS_WINDOW, Actions.TOGGLE_HIDE_DISABLED_BLOCKS, Actions.TOOLS_RUN_FDESIGN, Actions.TOGGLE_SCROLL_LOCK, Actions.CLEAR_REPORTS, - Actions.TOGGLE_AUTO_HIDE_PORT_LABELS + Actions.TOGGLE_AUTO_HIDE_PORT_LABELS, Actions.TOGGLE_SNAP_TO_GRID ): action.set_sensitive(True) if ParseXML.xml_failures: Messages.send_xml_errors_if_any(ParseXML.xml_failures) @@ -139,6 +139,7 @@ class ActionHandler: Actions.TOGGLE_BLOCKS_WINDOW, Actions.TOGGLE_AUTO_HIDE_PORT_LABELS, Actions.TOGGLE_SCROLL_LOCK, + Actions.TOGGLE_SNAP_TO_GRID ): action.load_from_preferences() elif action == Actions.APPLICATION_QUIT: if self.main_window.close_pages(): @@ -389,6 +390,8 @@ class ActionHandler: elif action == Actions.TOGGLE_AUTO_HIDE_PORT_LABELS: action.save_to_preferences() self.main_window.get_flow_graph().create_shapes() + elif action == Actions.TOGGLE_SNAP_TO_GRID: + action.save_to_preferences() ################################################## # Param Modifications ################################################## -- cgit v1.2.3