X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetPoint2d.cpp;h=249fd9a0e7fb2395e44e6f3dfe99aa7117015648;hb=67a7fe404a60e872f2012cfd0e9a621b99d9883a;hp=21f885c64ee4dadac4f2aefc45fca1368230f1a2;hpb=fc8500ea0a95bcdd8a811b30fc5330d23a2d3618;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 21f885c64..249fd9a0e 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -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());