Hello all.
I'm using my own widget inherited from QmitkStdMultiWidget and QmitkStdMultiWidget as well. I noticed that when you scroll mouse wheel, position in slice navigation controller is changed by 2 slices: 1->3->5, etc... This happens because QmitkStdMultiWidget creates mitk::MouseModeSwitcher object. And mitk::MouseModeSwitcher object creates mitk::DisplayInteractor and registers it globally. If we have two QmitkStdMultiWidgets, this leads to two global registered mitk::DisplayInteractors. When mouse wheel event is processed, both mitk::DisplayInteractors are called and each changes slice by one. What is the best way to deal with this problem? One possible variant is modify mitk::MouseModeSwitcher to register mitk::DisplayInteractor for particular renderer: // Register as listener via micro services us::ServiceProperties props; props["name"] = std::string("DisplayInteractor"); props["rendererName"] = m_rendererName; <--- Add this string m_ServiceRegistration = us::GetModuleContext()->RegisterService<InteractionEventObserver>( m_CurrentObserver.GetPointer(),props); In this case each display interactor will be connected to one particular renderer (or group of renderers with the same name) but this will requires changes in mitk::MouseModeSwitcher to make it aware of its parent renderer and changes in its clients to make them set up renderers' names and mode switcher's name. Does some better alternative exist? Regards, Alex. ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users