Skip to content

silx.gui.hdf5.Hdf5TreeView: Allow to set Hdf5TreeView's model in __init__#4626

Draft
t20100 wants to merge 1 commit into
mainfrom
hdf5treemodel-safer
Draft

silx.gui.hdf5.Hdf5TreeView: Allow to set Hdf5TreeView's model in __init__#4626
t20100 wants to merge 1 commit into
mainfrom
hdf5treemodel-safer

Conversation

@t20100

@t20100 t20100 commented Jun 16, 2026

Copy link
Copy Markdown
Member

PR summary

Merge PR #4616 first!

This PR:

  • only connects to Hdf5TreeModel's destroyed signal if ownFiles=True = when it is needed.
  • in silx view Viewer, avoids the creation of a first default model in Hdf5TreeView with ownFiles=True that is immediately replaced by a model with ownFiles=False.

This is achieved by adding an optional model argument to Hdf5TreeView to pass a custom model.
The alternative would be through inheritance and overriding Hdf5TreeView.createDefaultModel.

This PR mitigates issue #4605 by avoiding using the destroyed signal when it is not needed, but it does not fix functools.partial issue. PR #4616 fixes it.

With this PR, ewoksfluo segfault #4605 no longer occurs.

AI Disclosure

  • No AI used
  • AI tool(s) ... used for ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant