From 8ffadf88423290ad9b24a63a7d67ec36ccd5975b Mon Sep 17 00:00:00 2001 From: Sebastian Koslowski <koslowski@kit.edu> Date: Wed, 12 Oct 2016 15:17:09 +0200 Subject: grc: respect display scaling for block positions, canvas size and props dialog --- grc/gui/ActionHandler.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'grc/gui/ActionHandler.py') diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index f18fcea3e1..ec5ac7c574 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -23,7 +23,7 @@ import gtk import os import subprocess -from . import Dialogs, Preferences, Actions, Executor, Constants +from . import Dialogs, Preferences, Actions, Executor, Constants, Utils from .FileDialogs import (OpenFlowGraphFileDialog, SaveFlowGraphFileDialog, SaveConsoleFileDialog, SaveScreenShotDialog, OpenQSSFileDialog) @@ -688,8 +688,10 @@ class ActionHandler: Actions.FLOW_GRAPH_SAVE.set_sensitive(not page.get_saved()) main.update() try: #set the size of the flow graph area (if changed) - new_size = (flow_graph.get_option('window_size') or - self.platform.config.default_canvas_size) + new_size = Utils.scale( + flow_graph.get_option('window_size') or + self.platform.config.default_canvas_size + ) if flow_graph.get_size() != tuple(new_size): flow_graph.set_size(*new_size) except: pass -- cgit v1.2.3 From 27b6192c51bd42d8dc90d3a326a1c66e18ddbb33 Mon Sep 17 00:00:00 2001 From: Sebastian Koslowski <koslowski@kit.edu> Date: Sat, 12 Nov 2016 09:28:27 +0100 Subject: grc: fix initial setting of generate mode (issue #1089) --- grc/gui/ActionHandler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'grc/gui/ActionHandler.py') diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index f18fcea3e1..6e96268956 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -515,8 +515,9 @@ class ActionHandler: elif action == Actions.FLOW_GRAPH_NEW: main.new_page() if args: + flow_graph = main.get_flow_graph() flow_graph._options_block.get_param('generate_options').set_value(args[0]) - flow_graph_update() + flow_graph_update(flow_graph) elif action == Actions.FLOW_GRAPH_OPEN: file_paths = args if args else OpenFlowGraphFileDialog(page.get_file_path()).run() if file_paths: #open a new page for each file, show only the first -- cgit v1.2.3