Page MenuHomePhabricator | MITK

ILifecycleAwarePart to notify views if they are visible or not is not working
Open, NormalPublic


E.g. the segmentation view is always active and toggles datanodes, even if it is not visible anymore.
I tested if the methods (activated, visible, invisible, etc.) are used at all and they are never accessed, no matter what you do with the view.

Event Timeline

neher triaged this task as High priority.Dec 5 2017, 12:15 PM
neher created this task.
kalali added a subscriber: kalali.Dec 5 2017, 2:36 PM
kislinsk removed kislinsk as the assignee of this task.Dec 7 2017, 1:07 PM
kislinsk lowered the priority of this task from High to Normal.
kislinsk added a subscriber: kislinsk.

Using the current master I can debug and access the functions

void QmitkSegmentationView::Visible()

void QmitkSegmentationView::Hidden()

void QmitkSegmentationView::Activated()

void QmitkSegmentationView::Deactivated()

However, they do not contain any logic.
What do you mean by toggles datanodes; selecting nodes automatically due to the auto selection property?

neher added a comment.Jan 3 2018, 2:28 PM

selecting nodes automatically due to the auto selection property?

Yes. The auto selection should not be done if the view is not visible.

This should be handled in the method mentioned above, as it is for example done in the image statistics view. Nevertheless, on linux these methods are never entered (current master). This probably also causes T23972.

hettich added a subscriber: hettich.Jan 3 2018, 3:13 PM
kalali added a comment.Jan 5 2018, 6:00 PM

I tried it now with the current master using Ubuntu 16.04.
I am able to load two images, create a segmentation node for each image and toggle the node selection via auto-selection.

I temporarily added a m_Visible variable, that is correctly set to true/false in the Visible() / Hidden() functions and checked in the OnSelectionChanged-function.
Then, when the segmentation plugin view is hidden by another view, the node selection does not change anymore automatically, when (de-)selecting nodes in the data storage.

kalali added a comment.Mar 5 2019, 3:01 PM

I tried it again with the current master using Ubuntu 18.04.
I still have no problems debugging into the mentioned functions.

I still see your problem with the auto selection not deactivated when the view is hidden, but before we fix this with the m_Visible variable, could you recheck if you can enter the mentioned methods?