]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #252: Disable Ok button while mouse cursor in viewer
authorvsv <vitaly.smetannikov@opencascade.com>
Tue, 16 Dec 2014 11:06:18 +0000 (14:06 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Tue, 16 Dec 2014 11:06:18 +0000 (14:06 +0300)
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.cpp
src/XGUI/XGUI_PropertyPanel.cpp

index 5f0fc5750f5fc54b8b1ac1e824c6442858337040..51c3289a57fbfb919cb614688f6a05ad799eb2ff 100644 (file)
@@ -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, 
index 9e4826780ff1988e8ccd28e28200dc37e0bc63e7..b67ca1413cc802daa5a97e0bd20d731b7c635b97 100644 (file)
@@ -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)
index 864dad1feb4893b05392f00c754c50b7ef9a6a29..c3d200d41ae5f130f517a4802598062eafcd772e 100644 (file)
@@ -199,7 +199,7 @@ void XGUI_PropertyPanel::activateNextWidget()
 void XGUI_PropertyPanel::setAcceptEnabled(bool isEnabled)
 {
   QPushButton* anOkBtn = findChild<QPushButton*>(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<QPushButton*>(PROP_PANEL_OK);
-  anOkBtn->setEnabled(true);//theEnabled);
+  anOkBtn->setEnabled(theEnabled);
 }
 
 bool XGUI_PropertyPanel::isOkEnabled() const