diff options
author | Picca Frédéric-Emmanuel <picca@debian.org> | 2017-11-25 16:55:20 +0100 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@debian.org> | 2017-11-25 16:55:20 +0100 |
commit | e19c96eff0c310c06c4f268c8b80cb33bd08996f (patch) | |
tree | f2b4a365ed899be04766f3937bcc2d58d22be065 /silx/gui/plot/Profile.py | |
parent | bfa4dba15485b4192f8bbe13345e9658c97ecf76 (diff) |
New upstream version 0.6.1+dfsg
Diffstat (limited to 'silx/gui/plot/Profile.py')
-rw-r--r-- | silx/gui/plot/Profile.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/silx/gui/plot/Profile.py b/silx/gui/plot/Profile.py index ff85695..4a74fa7 100644 --- a/silx/gui/plot/Profile.py +++ b/silx/gui/plot/Profile.py @@ -31,6 +31,8 @@ __license__ = "MIT" __date__ = "17/08/2017" +import weakref + import numpy from silx.image.bilinear import BilinearImage @@ -348,7 +350,7 @@ class ProfileToolBar(qt.QToolBar): title='Profile Selection'): super(ProfileToolBar, self).__init__(title, parent) assert plot is not None - self.plot = plot + self._plotRef = weakref.ref(plot) self._overlayColor = None self._defaultOverlayColor = 'red' # update when active image change @@ -443,6 +445,11 @@ class ProfileToolBar(qt.QToolBar): self.getProfileMainWindow().sigClose.connect(self.clearProfile) @property + def plot(self): + """The :class:`.PlotWidget` associated to the toolbar.""" + return self._plotRef() + + @property @deprecated(since_version="0.6.0") def browseAction(self): return self._browseAction |