From: vsv Date: Tue, 16 Dec 2014 11:06:18 +0000 (+0300) Subject: Issue #252: Disable Ok button while mouse cursor in viewer X-Git-Tag: before_slalome_7.5.1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=80a89769ac6ad017fa66f60e2826abe048934ebb;p=modules%2Fshaper.git Issue #252: Disable Ok button while mouse cursor in viewer --- diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 5f0fc5750..51c3289a5 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -201,6 +201,7 @@ void PartSet_WidgetPoint2D::deactivate() disconnect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)), this, SLOT(onMouseRelease(ModuleBase_IViewWindow*, QMouseEvent*))); myWorkshop->moduleConnector()->deactivateSubShapesSelection(); + myWorkshop->operationMgr()->setLockValidating(false); } bool PartSet_WidgetPoint2D::getPoint2d(const Handle(V3d_View)& theView, diff --git a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp index 9e4826780..b67ca1413 100644 --- a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp +++ b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp @@ -76,6 +76,7 @@ void PartSet_WidgetPoint2dDistance::deactivate() this, SLOT(onMouseMove(ModuleBase_IViewWindow*, QMouseEvent*))); disconnect(aViewer, SIGNAL(mouseRelease(ModuleBase_IViewWindow*, QMouseEvent*)), this, SLOT(onMouseRelease(ModuleBase_IViewWindow*, QMouseEvent*))); + myWorkshop->operationMgr()->setLockValidating(false); } void PartSet_WidgetPoint2dDistance::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index 864dad1fe..c3d200d41 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -199,7 +199,7 @@ void XGUI_PropertyPanel::activateNextWidget() void XGUI_PropertyPanel::setAcceptEnabled(bool isEnabled) { QPushButton* anOkBtn = findChild(PROP_PANEL_OK); - anOkBtn->setEnabled(true);//isEnabled); + anOkBtn->setEnabled(isEnabled); } void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget) @@ -225,7 +225,7 @@ void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget) void XGUI_PropertyPanel::setOkEnabled(bool theEnabled) { QPushButton* anOkBtn = findChild(PROP_PANEL_OK); - anOkBtn->setEnabled(true);//theEnabled); + anOkBtn->setEnabled(theEnabled); } bool XGUI_PropertyPanel::isOkEnabled() const