Data Module: column show/hide branch or node is editable

Using a recent Slicer c88b17d38

Is this expected? Thanks

This seems to be a bug. Can you give it a try and fix it? I think edit triggers need to be changed. It would be nicer to not show the editable part at all, though.

@cpinter

1 Like

I would love it, but not much time right now. That’s why I opened an “issue” and not a PR directly.

I spent quite a bit of time trying to figure out why the ItemIsEditable flag seems to have no effect in Subject hierarchy, as opposed to the regular qMRMLSceneModel, where it works.

This line is supposed to selectively enable the editable flag which is off by default, I confirmed it with debugging:


However it doesn’t matter what this flag says, the cell is always editable.

The same thing is happening here, but in this case the editable flag works as expected.

I implemented a workaround to prevent editing of the visibility and ID columns. I committed it, so the symptom you reported doesn’t come up any more. If anybody has any idea about the ItemIsEditable mistery, I’d be glad to hear it.

1 Like

We teamed up with Andras and with some painful Qt debugging we managed to find the reason why the flag was not used properly. I committed the real fix and removed the previous workaround.

3 Likes

Thanks @cpinter @lassoan! :sparkles: