[SOLVED] Remove context menu from 3dView

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
DenysKovalenko
Posts: 12
Joined: Thu Oct 14, 2021 3:34 pm

[SOLVED] Remove context menu from 3dView

Post by DenysKovalenko »

Hello,
I'm creating my own workbench and i need to remove context menu(on right click) from 3dView.
is there any way to do that?
Last edited by DenysKovalenko on Thu Nov 04, 2021 3:22 pm, edited 1 time in total.
wmayer
Founder
Posts: 20306
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Remove context menu from 3dView

Post by wmayer »

The context-menu is created in the virtual function NavigationStyle::openPopupMenu. The class View3DInventorViewer has the function setPopupMenuEnabled() to disable the context-menu.
DenysKovalenko
Posts: 12
Joined: Thu Oct 14, 2021 3:34 pm

Re: Remove context menu from 3dView

Post by DenysKovalenko »

wmayer wrote: Tue Nov 02, 2021 11:49 am The context-menu is created in the virtual function NavigationStyle::openPopupMenu. The class View3DInventorViewer has the function setPopupMenuEnabled() to disable the context-menu.
Thanks for reply, but is there any way to do that in Python?
Cause i checked View3DInventorViewerPy class and there no setPopupMenuEnabled() function
wmayer
Founder
Posts: 20306
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Remove context menu from 3dView

Post by wmayer »

DenysKovalenko wrote: Tue Nov 02, 2021 2:09 pm Cause i checked View3DInventorViewerPy class and there no setPopupMenuEnabled() function
I have added this function today to the current developer version. git commit 9def811a3a49284

Do you use this version or the release v0.19?
DenysKovalenko
Posts: 12
Joined: Thu Oct 14, 2021 3:34 pm

Re: Remove context menu from 3dView

Post by DenysKovalenko »

Im using dev version and after update everything works for me.
Thanks for help
Post Reply