diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2015-06-21 22:51:01 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2015-07-17 15:47:50 +0200 |
commit | b05c650a8c2645a0354f9176f8112cd6a67e0996 (patch) | |
tree | 0c7aa9b1a41386f69ead0d15456aecf3bc7e0328 /grc/gui/ActionHandler.py | |
parent | 11752ea4f6868594b511fceac05d5677670e2f1c (diff) |
grc: add user settings for canvas default size and canvas font size (+ clean-ups)
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r-- | grc/gui/ActionHandler.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index 584b4120e6..5dbfea024b 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -35,6 +35,7 @@ from PropsDialog import PropsDialog from ParserErrorsDialog import ParserErrorsDialog import Dialogs from FileDialogs import OpenFlowGraphFileDialog, SaveFlowGraphFileDialog, SaveReportsFileDialog, SaveImageFileDialog +from . Constants import DEFAULT_CANVAS_SIZE gobject.threads_init() @@ -598,7 +599,8 @@ class ActionHandler: Actions.FLOW_GRAPH_SAVE.set_sensitive(not self.get_page().get_saved()) self.main_window.update() try: #set the size of the flow graph area (if changed) - new_size = self.get_flow_graph().get_option('window_size') + new_size = (self.get_flow_graph().get_option('window_size') or + DEFAULT_CANVAS_SIZE) if self.get_flow_graph().get_size() != tuple(new_size): self.get_flow_graph().set_size(*new_size) except: pass |