summaryrefslogtreecommitdiff
path: root/silx/gui/plot/actions/mode.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/plot/actions/mode.py')
-rw-r--r--silx/gui/plot/actions/mode.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/silx/gui/plot/actions/mode.py b/silx/gui/plot/actions/mode.py
index 026a94d..ee05256 100644
--- a/silx/gui/plot/actions/mode.py
+++ b/silx/gui/plot/actions/mode.py
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
-# Copyright (c) 2004-2017 European Synchrotron Radiation Facility
+# Copyright (c) 2004-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
@@ -69,7 +69,9 @@ class ZoomModeAction(PlotAction):
self.blockSignals(old)
def _actionTriggered(self, checked=False):
- self.plot.setInteractiveMode('zoom', source=self)
+ plot = self.plot
+ if plot is not None:
+ plot.setInteractiveMode('zoom', source=self)
class PanModeAction(PlotAction):
@@ -97,4 +99,6 @@ class PanModeAction(PlotAction):
self.blockSignals(old)
def _actionTriggered(self, checked=False):
- self.plot.setInteractiveMode('pan', source=self)
+ plot = self.plot
+ if plot is not None:
+ plot.setInteractiveMode('pan', source=self)