From e077d7e381c28ff0ae5a4ac88b140746dabd95c3 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 27 Jan 2015 17:22:08 +0300 Subject: [PATCH] Issue #348 Validate sketch is disabled when point coordinates are set manually The storeValue should happens only in the creation mode. Erroneous case is the constraint lenght is moved by the edit start. The (0,0) point value is set to the feature by the operation start, point 2d control activation. --- src/PartSet/PartSet_WidgetPoint2d.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index c008d9d71..249fd9a0e 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -194,9 +194,12 @@ void PartSet_WidgetPoint2D::activate() QIntList aModes; aModes << TopAbs_VERTEX; myWorkshop->moduleConnector()->activateSubShapesSelection(aModes); - // 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 - storeValue(); + 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() -- 2.39.2