Gui: Show context menu on right click in OpenSCAD navigation style if not panned

This commit is contained in:
Rexbas
2023-12-26 12:00:20 +01:00
parent 2c8ba7f2c3
commit be09701e8b
3 changed files with 13 additions and 3 deletions

View File

@@ -143,9 +143,10 @@ SbBool OpenSCADNavigationStyle::processSoEvent(const SoEvent * const ev)
if (!viewer->isEditing()) {
// If we are in zoom or pan mode ignore RMB events otherwise
// the canvas doesn't get any release events
if (curmode != NavigationStyle::ZOOMING &&
if ((curmode != NavigationStyle::ZOOMING &&
curmode != NavigationStyle::PANNING &&
curmode != NavigationStyle::DRAGGING) {
curmode != NavigationStyle::DRAGGING) ||
(curmode == NavigationStyle::PANNING && !hasPanned)) {
if (this->isPopupMenuEnabled()) {
if (!press) { // release right mouse button
this->openPopupMenu(event->getPosition());