- changing the mouse mode via the buttons in the mouse mode toolbar (PACS-like mode in StdMultiWidget) results in a call of 'OnMouseModeChanged'
- this happens, since the command observes the 'MouseModeChangedEvent' event of mouse mode switcher and calls 'OnMouseModeChanged'; changing the mouse mode via the buttons in the mouse mode toolbar leads to the mouse mode switcher invoking the 'MouseModeChangedEvent' event.
- 'OnMouseModeChanged' is even called twice, since both functions 'SetInteractionScheme' and 'SelectMouseMode' of the 'mitkMouseModeSwitcher'-class invoke the event
- the 'OnMouseModeChanged'-function inside the 'QmitkMouseModeSwitcher' emits the 'MouseModeSelected'-signal; this signal is never used anywhere
- a bool variable is used to block the slot from being called when the action button check state is changed; could simply use qt block mechanism to do this (if any blocking is needed?)
Description
Revisions and Commits
rMITK MITK | |||
Restricted Differential Revision | rMITKb9ba2c417b2c Do not set the interaction scheme | ||
Restricted Differential Revision | rMITKfe71c9e533f4 Do not set the default event config for the interaction scheme | ||
Restricted Differential Revision | rMITK9fc6d9258f4e Clean usage of QmitkInteractionSchemeToolBar and InteractionSchemeSwitcher | ||
Restricted Differential Revision | rMITK99775c5afe86 Remove member variable and create new variable on demand | ||
Restricted Differential Revision | rMITKa4b63edd857b Do not set the interaction scheme | ||
Restricted Differential Revision | rMITK556fc11aef9c Do not explicitly set the visibility of the tool bar | ||
Restricted Differential Revision | rMITK8e756e71766c Remove unnecessary function, member and header | ||
Restricted Differential Revision | rMITK895486021524 Cherry-picked old changes: Remove-QmitkMouseModeSwitcher | ||
Restricted Differential Revision | rMITK181d3c4e3fab Fix wrong slot definition; use new connect-syntax | ||
Restricted Differential Revision | rMITK4b84f9c383c9 Remove files | ||
Restricted Differential Revision | rMITK0e9839351823 Modify replacing QmitkInteractionSchemeToolBar |
Status | Assigned | Task | ||
---|---|---|---|---|
Resolved | kalali | T24356 Rework mouse mode switcher | ||
Resolved | kalali | T24358 Rework QmitkMouseModeSwitcher |
Event Timeline
A new class, the QmitkInteractionSchemeToolBar has already been introduced in 9ab09bff137b. This class is used as a replacement for the QmitkMouseModeSwitcher. It it a simplified version which does not observe the mouse mode switcher / interaction scheme switcher. There is no observer tag and no block-functionality.
Additionally, the tool bar is adjusted to match the new InteractionSchemeSwitcher (see T24357): There is no difference anymore between a mouse mode and an interaction scheme (see T24368).
The new toolbar is used for the mxnmulwiwidgeteditor and is currently tested with the stdmultiwidgeteditor (see 732f754ad203).
Has been solved on top of T26476.
This task will be closed if everything is merged to master and tested (wait for D212).
This task / branch was never merged into master; the mentioned BlackSwan task T26476 is still not contained in master / develop.
For reasons of cleanliness I will open a new branch / differential containing just the changes related to this task such that we can merge the new branch into develop and close this task.
@s434n will help me evaluate the relevance / validity of the changes.
This is a good candidate for some XML parsing errors that we see in the latest develop version of the MitkWorkbench, For example, activate any 3D segmentation tool and look at the console output:
vtkXMLParser.cxx:379 ERR| vtkXMLParser (0000027698218908): Error parsing XML in stream at line 1, column 0, byte index -1: no element found
It starts with line 162 in mitkTool.cpp (last code line in snippet):
auto displayActionEventBroadcast = dynamic_cast<DisplayActionEventBroadcast*>(us::GetModuleContext()->GetService<InteractionEventObserver>(*it)); if (displayActionEventBroadcast != nullptr) { // remember the original configuration m_DisplayInteractorConfigs.insert(std::make_pair(*it, displayActionEventBroadcast->GetEventConfig())); // here the alternative configuration is loaded displayActionEventBroadcast->AddEventConfig(m_EventConfig.c_str()); // line 162, m_EventConfig is an empty string }
I guess m_EventConfig is not supposed to be an empty string. Or, if it is supposed to be an empty string, AddEventConfig() should probably handle it gracefully, before the vtkXMLParser has the chance to complain.
Thanks for the observation / hint. I guess this is related to D531 and T28667 resp.
For the 3D segmentation tool no interaction event is added. This is typically only used to block the left mouse button, e.g. for "Add", "Paint" etc.
So the default event was set to empty. I will fix this is the mentioned task.