Gui: Prevent showing the context menu after dragging, panning or zooming
This commit is contained in:
@@ -144,16 +144,17 @@ SbBool CADNavigationStyle::processSoEvent(const SoEvent * const ev)
|
||||
// If we are in edit mode then simply ignore the RMB events
|
||||
// to pass the event to the base class.
|
||||
this->lockrecenter = true;
|
||||
if (!viewer->isEditing()) {
|
||||
// If we are in zoom or pan mode ignore RMB events otherwise
|
||||
// the canvas doesn't get any release events
|
||||
|
||||
// Don't show the context menu after dragging, panning or zooming
|
||||
if (!press && (hasDragged || hasPanned || hasZoomed)) {
|
||||
processed = true;
|
||||
}
|
||||
if (!press && !viewer->isEditing()) {
|
||||
if (this->currentmode != NavigationStyle::ZOOMING &&
|
||||
this->currentmode != NavigationStyle::PANNING &&
|
||||
this->currentmode != NavigationStyle::DRAGGING) {
|
||||
if (this->isPopupMenuEnabled()) {
|
||||
if (!press) { // release right mouse button
|
||||
this->openPopupMenu(event->getPosition());
|
||||
}
|
||||
this->openPopupMenu(event->getPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user