From d3883990177d27a12b8a2278cdbb82250ff19b79 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 29 Jun 2015 15:19:55 +0300 Subject: [PATCH] Issue #604 Creation of an unexpected line in the Sketcher Regression: Apply is always disable during mirror operation when the cursor is over property panel. Using myIsResetCurrentValue instead of myIsPropertyPanelValueChanged. --- src/ModuleBase/ModuleBase_ModelWidget.h | 3 ++- src/ModuleBase/ModuleBase_WidgetDoubleValue.h | 2 +- src/PartSet/PartSet_WidgetPoint2dDistance.cpp | 10 ---------- src/PartSet/PartSet_WidgetPoint2dDistance.h | 3 --- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index ce5eb8067..a237e6e29 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -47,7 +47,8 @@ Q_OBJECT virtual void disconnectSignals() {}; /// Fills the widget with default values - virtual void reset() {}; + /// \return true if the widget current value is reset + virtual bool reset() { return false; }; /// Returns the state whether the attribute of the feature is initialized /// \param theObject a model feature to be checked diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.h b/src/ModuleBase/ModuleBase_WidgetDoubleValue.h index 228efa0d2..186ae90a3 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.h +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.h @@ -38,7 +38,7 @@ Q_OBJECT virtual ~ModuleBase_WidgetDoubleValue(); /// Fills the widget with default values - virtual void reset(); + virtual bool reset(); //! Read value of corresponded attribute from data model to the input control // \return True in success diff --git a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp index 3dfefe349..c573499fb 100644 --- a/src/PartSet/PartSet_WidgetPoint2dDistance.cpp +++ b/src/PartSet/PartSet_WidgetPoint2dDistance.cpp @@ -42,16 +42,6 @@ PartSet_WidgetPoint2dDistance::~PartSet_WidgetPoint2dDistance() { } -// It is not clear a necesity of this method also it contradicts to scenario defined in parent class -//void PartSet_WidgetPoint2dDistance::reset() -//{ -// bool isOk; -// double aDefValue = QString::fromStdString(getDefaultValue()).toDouble(&isOk); -// -// ModuleBase_Tools::setSpinValue(mySpinBox, isOk ? aDefValue : 0.0); -// storeValueCustom(); -//} - void PartSet_WidgetPoint2dDistance::setPoint(FeaturePtr theFeature, const std::shared_ptr& thePnt) { diff --git a/src/PartSet/PartSet_WidgetPoint2dDistance.h b/src/PartSet/PartSet_WidgetPoint2dDistance.h index 5db72e573..889ee2ed0 100644 --- a/src/PartSet/PartSet_WidgetPoint2dDistance.h +++ b/src/PartSet/PartSet_WidgetPoint2dDistance.h @@ -50,9 +50,6 @@ Q_OBJECT virtual ~PartSet_WidgetPoint2dDistance(); - /// Fills the widget with default values - //virtual void reset(); - /// The methiod called when widget is deactivated virtual void deactivate(); -- 2.39.2