X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FXGUI%2FXGUI_ViewWindow.cpp;h=5a1a9ba4097ed64aeef7c13082fce24c09e0f8ae;hb=25df988cd1b0b85f45355f2c21c2642cd0ea1d74;hp=44b64c985d201d65ab8ae591e6401ca298d0df43;hpb=c52423b158d7e2bae396c62e4fe62e7e8f78c381;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ViewWindow.cpp b/src/XGUI/XGUI_ViewWindow.cpp index 44b64c985..5a1a9ba40 100644 --- a/src/XGUI/XGUI_ViewWindow.cpp +++ b/src/XGUI/XGUI_ViewWindow.cpp @@ -295,7 +295,6 @@ XGUI_ViewWindow::XGUI_ViewWindow(XGUI_Viewer* theViewer, V3d_TypeOfView theType) connect(myViewPort, SIGNAL(vpUpdated()), this, SLOT(updateToolBar())); connect(this, SIGNAL(vpTransformationFinished(XGUI_ViewWindow::OperationType)), this, SLOT(updateToolBar())); - } //**************************************************************** @@ -677,6 +676,16 @@ void XGUI_ViewWindow::vpMousePressEvent(QMouseEvent* theEvent) l_mbPressEvent = new QMouseEvent( *theEvent );*/ } +//**************************************************************** +void XGUI_ViewWindow::contextMenuEvent(QContextMenuEvent* theEvent) +{ + if (theEvent->modifiers() == Qt::NoModifier) { + // Temporary: has to be removed when viewer popup will be defined + //QFrame::contextMenuEvent(theEvent); + emit contextMenuRequested(theEvent); + } +} + //**************************************************************** void XGUI_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent) { @@ -693,10 +702,6 @@ void XGUI_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent) } */ emit mouseReleased(this, theEvent); - if (theEvent->button() == Qt::RightButton && prevState == -1) { - QContextMenuEvent aEvent(QContextMenuEvent::Mouse, theEvent->pos(), theEvent->globalPos()); - emit contextMenuRequested(&aEvent); - } } break; case ROTATE: