Commit 8de826c9 authored by Thomas Vincent's avatar Thomas Vincent
Browse files

Use wrapper from silx

parent fa5d3baf
Pipeline #12738 failed with stages
in 3 minutes and 24 seconds
......@@ -36,12 +36,7 @@ import weakref
import h5py
from silx.gui import qt as Qt, icons
if Qt.BINDING == 'PySide':
def isdeleted(widget):
return False
else:
from sip import isdeleted
from silx.gui.qt import inspect
from ..model.Node import Node
from ..model.ModelDef import ModelColumns
......@@ -166,7 +161,7 @@ class IntensityGroupNode(H5GroupNode):
"""
view = self.__viewWidget
if view is None or view() is None or isdeleted(view()):
if view is None or view() is None or not inspect.isValid(view()):
iGroup = IntensityGroup(self.h5File, nodePath=self.h5Path)
view = weakref.ref(IntensityView(iGroup, parent))
self.__viewWidget = view
......@@ -496,7 +491,7 @@ class QSpaceItemNode(ProjectNode):
:return:
"""
view = self.__viewWidget
if view is None or view() is None or isdeleted(view()):
if view is None or view() is None or not inspect.isValid(view()):
qItem = QSpaceItem(self.h5File, nodePath=self.h5Path)
view = weakref.ref(QSpaceView(qItem, parent=parent))
self.__viewWidget = view
......@@ -639,7 +634,7 @@ class FitItemNode(ProjectNode):
:return:
"""
view = self.__viewWidget
if view is None or view() is None or isdeleted(view()):
if view is None or view() is None or not inspect.isValid(view()):
fitItem = FitItem(self.h5File, nodePath=self.h5Path)
view = weakref.ref(FitView(parent, fitItem))
self.__viewWidget = view
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment