ilastik / ilastik-napari

ilastik plugin for napari
MIT License
13 stars 2 forks source link

Adapt for napari 0.4.18 #14

Closed btbest closed 5 months ago

btbest commented 6 months ago

Since napari 0.4.18, the plugin couldn't be activated anymore, see https://forum.image.sc/t/issue-activating-ilastik-napari/94433

The problem seems to be the wrapping of the layer list's ReverseProxyModel in PublicOnlyProxy. A true ReverseProxyModel would be compatible with setSourceModel, but napari seems to wrap it in a PublicOnlyProxy that is supposed to expose the internals, but doesn't quite manage it in a way that satisfies Qt. I suspect the problem is that type(layer_model) == PublicOnlyProxy even though isinstance(layer_model, ReverseProxyModel) == True.

Anyway, this way napari also stops complaining about accessing the qt viewer.

k-dominik commented 5 months ago

fixes #13

btbest commented 5 months ago

Do you think it makes sense to set some minimum version of napari in pyproject.toml that has LayerList in napari.components in a compatible state (I assume at the time Emil implemented this, it was not the case)?

I've confirmed the plugin works like this all the way back to 0.4.13, so I don't think it was a matter of compatibility 😅 Is the new commit ok?

k-dominik commented 5 months ago

Cool! Awesome that you went through all the versions!