summaryrefslogtreecommitdiff
path: root/grc/gui/ActionHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r--grc/gui/ActionHandler.py4
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