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.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py
index 85b68a9629..913eb5a8d1 100644
--- a/grc/gui/ActionHandler.py
+++ b/grc/gui/ActionHandler.py
@@ -24,9 +24,8 @@ import os
import subprocess
from gi.repository import Gtk
-from gi.repository import GObject
-from . import Dialogs, Preferences, Actions, Executor, Constants, FileDialogs
+from . import Dialogs, Preferences, Actions, Executor, FileDialogs, Utils
from .MainWindow import MainWindow
from .ParserErrorsDialog import ParserErrorsDialog
from .PropsDialog import PropsDialog
@@ -548,8 +547,10 @@ class ActionHandler:
elif action == Actions.FLOW_GRAPH_SCREEN_CAPTURE:
file_path, background_transparent = FileDialogs.SaveScreenShot(main, page.file_path).run()
if file_path is not None:
- pixbuf = flow_graph.get_drawing_area().get_screenshot(background_transparent)
- pixbuf.save(file_path, Constants.IMAGE_FILE_EXTENSION[1:])
+ try:
+ Utils.make_screenshot(flow_graph, file_path, background_transparent)
+ except ValueError:
+ Messages.send('Failed to generate screen shot\n')
##################################################
# Gen/Exec/Stop
##################################################