Page MenuHomePhabricator

LevelWindow slider loses focus when "Use Whole Image Greyvalues" is clicked
Closed, ResolvedPublic

Description

If you do a right click on the level window slider and chose "Use Whole Image Greyvalues" the level window slider will lose the focus. That means that it won't work properly afterwards:
Usually, an arrow should occur when your courser hovers the end of the slider. This arrow is missing when "Use Whole Image Greyvalues" was performed previously. (I tried to make a screen shot of this, but the arrow is not captured in general). When this arrow is missing, it is possible to totally "destroy" the ranges of the level window with just one hold click. This destroyed range is really confusing for the user.

Event Timeline

Can be reproduced on any OS with any image. For detailed explanation ask Andi or me.

The focus loss happens for all actions from the context menu. The mouse pointer remains in '->' form if the context menu was open over the blue slider and it remains in '<->' if the context menu was open over the scale.

The normal interaction gets restored after a click + move inside the LevelWindowWidget.

The problem is the m_MouseDown member variable held in QmitkSliderLevelWindow.

The variable is set to 'false' only in the mouseReleaseEvent() which is not entered after the contextMenuEvent() and hence the m_MouseDown remains set to true. After re-entering the widget, the code block in mouseMoveEvent() responsible for switching the cursor type is not entered.

[99bef3]: Merge branch 'bug-13327-LevelWindow-mouseCursor-fix'

Merged commits:

2012-10-10 16:36:05 Jan Hering [414df7]
Reseting m_MouseDown after contextMenuEvent()