Page MenuHomePhabricator

ImageNavigator Button is not consistent
Closed, ResolvedPublic

Description

When closing the imageNavigator tab, the imageNavigator button in the toolbar is not deactivated. We suppose to deactivate the button after each click and waive the information of activation state.

Event Timeline

Sascha or Michi, could you point out a solution to this problem? I guess the easiest one would be to deactivate the tab (including the "close" cross) of image navigator?

This is information from #3361, which seems closely related:

When activating ImageNavigator bundle (has to be closed before), then bundles
other than Datamanager and PropertyList are closed.

--> open Application
--> open Bundle (e.g. Measurements)
--> close ImageNavigator
--> reopen ImageNavigator

The faulty behaviour is mostly due to a call to IWorkbenchPage::ResetPerspective() in QmitkExtWorkbenchWindowAdvisorHack::onImageNavigator(). This method should not be called when toggling the image navigator view, as it resets the perspective (i.e. closes all views not originally defined in the current perspective) as its name says.

You should register an IPartListener instance and listen to the image navigator views visible/hidden/closed etc. events and react to it by properly setting the state of the toolbar button.

See for example the code in PartListenerForTitle in the QmitkExtWorkbenchWindowAdvisor.cpp file.

Alex, you worked on this initially. Can I assign it to you?

[SVN revision 21778]
FIX (#3360): added IPartListener for ImageNavigator view to allow correct toggling of menuBar button.