diff options
author | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:24 +0100 |
---|---|---|
committer | Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> | 2018-12-17 12:28:24 +0100 |
commit | cebdc9244c019224846cb8d2668080fe386a6adc (patch) | |
tree | aedec55da0f9dd4fc4d6c7eb0f58489a956e2e8c /silx/gui/plot/utils/axis.py | |
parent | 159ef14fb9e198bb0066ea14e6b980f065de63dd (diff) |
New upstream version 0.9.0+dfsg
Diffstat (limited to 'silx/gui/plot/utils/axis.py')
-rw-r--r-- | silx/gui/plot/utils/axis.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/silx/gui/plot/utils/axis.py b/silx/gui/plot/utils/axis.py index fae50b4..bd19996 100644 --- a/silx/gui/plot/utils/axis.py +++ b/silx/gui/plot/utils/axis.py @@ -35,6 +35,13 @@ from contextlib import contextmanager import weakref import silx.utils.weakref as silxWeakref +try: + from ...qt.inspect import isValid as _isQObjectValid +except ImportError: # PySide(1) fallback + def _isQObjectValid(obj): + return True + + _logger = logging.getLogger(__name__) @@ -135,7 +142,7 @@ class SyncAxes(object): raise RuntimeError("Axes not synchronized") for ref, callbacks in self.__callbacks.items(): axis = ref() - if axis is not None: + if axis is not None and _isQObjectValid(axis): for sigName, callback in callbacks: sig = getattr(axis, sigName) sig.disconnect(callback) |