View Issue Details

IDProjectCategoryView StatusLast Update
0000424FreeCADBugpublic2011-09-02 18:29
ReportermrlukeparryAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Versiontrunk 
Target VersionFixed in Version0.12 
Summary0000424: Sketcher: Using right click menu prevents receiving selectionChanged messages
DescriptionIf 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 InformationI 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:

Coin error in SoEventManager::processEvent(): Recursive invocation detected. Delay processing event until the current event is finished processing.
TagsNo tags attached.

Activities

wmayer

2011-08-26 15:38

administrator   ~0001009

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.

Jriegel

2011-08-27 05:59

administrator   ~0001010

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.

2011-08-27 09:15

 

0000424.patch (Attachment missing)

wmayer

2011-08-27 09:15

administrator   ~0001012

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.

wmayer

2011-09-02 18:29

administrator   ~0001034

Done in r4874

Issue History

Date Modified Username Field Change
2011-08-26 07:21 mrlukeparry New Issue
2011-08-26 15:38 wmayer Note Added: 0001009
2011-08-27 05:59 Jriegel 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