myRotationPointSelection(false),
myClosable(true),
myStartX(0), myStartY(0), myCurrX(0), myCurrY(0), myCurScale(0.0), myCurSketch(0),
- myDrawRect(false), myEnableDrawMode(true), myCursorIsHand(false), myEventStarted(false),
+ myDrawRect(false), myEnableDrawMode(false), myCursorIsHand(false), myEventStarted(false),
myIsActive(false),
myLastState(WindowNormalState), myOperation(NOTHING)
{
connect(myViewPort, SIGNAL(vpUpdated()), this, SLOT(updateToolBar()));
connect(this, SIGNAL(vpTransformationFinished(XGUI_ViewWindow::OperationType)),
this, SLOT(updateToolBar()));
-
}
//****************************************************************
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)
{
}
*/
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:
myWindowBar->update();
}
+/*!
+ \brief Update state of enable draw mode state.
+*/
+void XGUI_ViewWindow::updateEnabledDrawMode()
+{
+ myEnableDrawMode = myViewer->isSelectionEnabled() &&
+ myViewer->isMultiSelectionEnabled();
+}