this, SLOT(onMouseMove(ModuleBase_IViewWindow*, QMouseEvent*)));
connect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)),
this, SLOT(onMouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)));
+ connect(aViewer, SIGNAL(leaveViewPort()), this, SLOT(onLeaveViewPort()));
QIntList aModes;
aModes << TopAbs_VERTEX;
this, SLOT(onMouseMove(ModuleBase_IViewWindow*, QMouseEvent*)));
disconnect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)),
this, SLOT(onMouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)));
+ disconnect(aViewer, SIGNAL(leaveViewPort()), this, SLOT(onLeaveViewPort()));
+
myWorkshop->moduleConnector()->deactivateSubShapesSelection();
myWorkshop->operationMgr()->setLockValidating(false);
}
setPoint(aX, anY);
}
+void PartSet_WidgetPoint2D::onLeaveViewPort()
+{
+ // it is important to restore the validity state in the property panel after leaving the
+ // view port. Unlock the validating.
+ XGUI_OperationMgr* anOperationMgr = myWorkshop->operationMgr();
+ if (anOperationMgr->isValidationLocked()) {
+ anOperationMgr->setLockValidating(false);
+ anOperationMgr->onValidateOperation();
+ }
+}
+
double PartSet_WidgetPoint2D::x() const
{
return myXSpin->value();
/// \param theEvent a mouse event
void onMouseRelease(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent);
+ /// Process mouse leave view port to update validity state of the property panel
+ void onLeaveViewPort();
+
protected:
/// Saves the internal parameters to the given feature
/// \return True in success