View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000424||FreeCAD||Bug||public||2011-08-26 07:21||2011-09-02 18:29|
|Fixed in Version||0.12|
|Summary||0000424: Sketcher: Using right click menu prevents receiving selectionChanged messages|
|Description||If you right click on the Sketcher background to show to context menu (contains add geometry items). Then add an edge to the global selection, you cannot clear the section by clicking on the background.|
However, edges points may be still added to the selection, but not cleared.
|Additional Information||I thought it might have been the double click code recently added, but I believe it's something else.|
I have found that no messages are received by the method ViewProviderSketch::onSelectionChanged
I am guessing that it might be caused by changes to SoFCSelection
I also found I received the following warning, but it's not reproducible:
[0m[1;31mCoin error in SoEventManager::processEvent(): Recursive invocation detected. Delay processing event until the current event is finished processing.
|Tags||No tags attached.|
After a longer debugging session the problem seems to be this:
A right-click does´a mouse button down and up.
The down is handled in CADNavigationStyle::processSoEvent and sets it member "button2down" to TRUE
The event is passed further down to the scene graph and handled by ViewProviderSketch::mouseButtonPressed which opens a context-menu
But then there is no mouse button up event sent to the 3d view and thus button2down is still TRUE. This then leads to a different handling of mouse button events in CADNavigationStyle::processSoEvent and avoids to clear the selection.
I guess the reason is that the appearing context-menu handles the mouse button up event.
If you close the sketch, do a right-click then it works again.
I would say we remove the context menu handling from the Sketch ViewProvider it do it globally or in the workbench.
The context menu is anyway some kind of construction site. Its by far not that
"context sensitive" as it should be ;) may be we should use the TaskWatcher filter
technique for the context menu too.
It's basically not a problem to have the context-menu there but I think it's somewhat overloaded. Having only the sketcher geometry and constraint stuff should be enough.
And to fix the bug the context-menu should be shown with the mouse button up rather than mouse button down. Changing this you'll see that it works but then you'll get an interference with the global context-menu. To fix this you have to put the viewer in edit mode.
Have a look to the uploaded patch.
||Done in r4874|
|2011-08-26 07:21||mrlukeparry||New Issue|
|2011-08-26 15:38||wmayer||Note Added: 0001009|
||Note Added: 0001010|
|2011-08-27 09:15||wmayer||File Added: 0000424.patch|
|2011-08-27 09:15||wmayer||Note Added: 0001012|
|2011-09-02 18:29||wmayer||Note Added: 0001034|
|2011-09-02 18:29||wmayer||Status||new => closed|
|2011-09-02 18:29||wmayer||Resolution||open => fixed|
|2011-09-02 18:29||wmayer||Fixed in Version||=> 0.12|