summaryrefslogtreecommitdiff
path: root/silx/gui/plot/PrintPreviewToolButton.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot/PrintPreviewToolButton.py')
-rw-r--r--silx/gui/plot/PrintPreviewToolButton.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/silx/gui/plot/PrintPreviewToolButton.py b/silx/gui/plot/PrintPreviewToolButton.py
index c5479b8..b48505d 100644
--- a/silx/gui/plot/PrintPreviewToolButton.py
+++ b/silx/gui/plot/PrintPreviewToolButton.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2017 European Synchrotron Radiation Facility
+# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -175,7 +175,8 @@ class PrintPreviewToolButton(qt.QToolButton):
def _plotToPrintPreview(self):
"""Grab the plot widget and send it to the print preview dialog.
Make sure the print preview dialog is shown and raised."""
- self.printPreviewDialog.ensurePrinterIsSet()
+ if not self.printPreviewDialog.ensurePrinterIsSet():
+ return
if qt.HAS_SVG:
svgRenderer, viewBox = self._getSvgRendererAndViewbox()