Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/silx/gui/hdf5/Hdf5TreeModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import os
import logging
import functools
from .. import qt
from .. import icons
from .Hdf5Node import Hdf5Node
Expand Down Expand Up @@ -243,7 +242,13 @@ def __init__(self, parent=None, ownFiles=True):
# while the QObject still exists.
# We use a static method plus explicit references to objects to
# release. The callback do not use any ref to self.
onDestroy = functools.partial(self._closeFileList, self.__openedFiles)
# onDestroy = functools.partial(self._closeFileList, self.__openedFiles)
def onDestroy():
try:
self._closeFileList(self.__openedFiles)
except Exception:
pass

self.destroyed.connect(onDestroy)

@staticmethod
Expand Down
Loading