Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2d.cpp
index 21f885c64ee4dadac4f2aefc45fca1368230f1a2..249fd9a0e7fb2395e44e6f3dfe99aa7117015648 100644 (file)
@@ -194,6 +194,12 @@ void PartSet_WidgetPoint2D::activate()
   QIntList aModes;
   aModes << TopAbs_VERTEX;
   myWorkshop->moduleConnector()->activateSubShapesSelection(aModes);
+  if (!isEditingMode()) {
+    // the control value is stored to the mode by the focus in on the widget
+    // we need the value is initialized in order to enable the apply button in the property panel
+    // it should happens only in the creation mode because during edition all fields are filled
+    storeValue();
+  }
 }
 
 void PartSet_WidgetPoint2D::deactivate()
@@ -276,6 +282,9 @@ void PartSet_WidgetPoint2D::onMouseMove(ModuleBase_IViewWindow* theWnd, QMouseEv
   if (isEditingMode())
     return;
   myWorkshop->operationMgr()->setLockValidating(true);
+  // the Ok button should be disabled in the property panel by moving the mouse point in the viewer
+  // this leads that the user does not try to click Ok and it avoids an incorrect situation that the 
+  // line is moved to the cursor to the Ok button
   myWorkshop->propertyPanel()->setOkEnabled(false);
 
   gp_Pnt aPoint = PartSet_Tools::convertClickToPoint(theEvent->pos(), theWnd->v3dView());