From: jfa Date: Fri, 19 Mar 2021 11:03:52 +0000 (+0300) Subject: Bos #24055. Minor changes. X-Git-Tag: V9_7_0a1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eaf84a526d6b44d1d9cd7c56daea6c63f97a679c;p=modules%2Fshaper.git Bos #24055. Minor changes. --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp index 0ef1875dc..3461326aa 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp @@ -220,7 +220,7 @@ void FeaturesPlugin_Extrusion::getSizes(double& theToSize, double& theFromSize) if (string(CREATION_METHOD())->value() == CREATION_METHOD_BY_SIZES()) { theToSize = real(TO_SIZE_ID())->value(); theFromSize = real(FROM_SIZE_ID())->value(); - } if (string(CREATION_METHOD())->value() == CREATION_METHOD_BY_PLANES()) { + } else if (string(CREATION_METHOD())->value() == CREATION_METHOD_BY_PLANES()) { theToSize = real(TO_OFFSET_ID())->value(); theFromSize = real(FROM_OFFSET_ID())->value(); } else { diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h index 088e8b19c..0928ff61a 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h @@ -56,22 +56,22 @@ public: /// Attribute name for creation method. inline static const std::string& CREATION_METHOD_BY_SIZES() { - static const std::string MY_CREATION_METHOD_ID("BySizes"); - return MY_CREATION_METHOD_ID; + static const std::string MY_CREATION_METHOD_BY_SIZES("BySizes"); + return MY_CREATION_METHOD_BY_SIZES; } /// Attribute name for creation method. inline static const std::string& CREATION_METHOD_BY_PLANES() { - static const std::string MY_CREATION_METHOD_ID("ByPlanesAndOffsets"); - return MY_CREATION_METHOD_ID; + static const std::string MY_CREATION_METHOD_BY_PLANES("ByPlanesAndOffsets"); + return MY_CREATION_METHOD_BY_PLANES; } /// Attribute name for creation method. inline static const std::string& CREATION_METHOD_THROUGH_ALL() { - static const std::string MY_CREATION_METHOD_ID("ThroughAll"); - return MY_CREATION_METHOD_ID; + static const std::string MY_CREATION_METHOD_THROUGH_ALL("ThroughAll"); + return MY_CREATION_METHOD_THROUGH_ALL; } /// Attribute name of an object to which the extrusion grows. diff --git a/src/FeaturesPlugin/FeaturesPlugin_Revolution.h b/src/FeaturesPlugin/FeaturesPlugin_Revolution.h index d9c2b9910..6ab504e34 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Revolution.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Revolution.h @@ -51,22 +51,22 @@ public: /// Attribute name for creation method. inline static const std::string& CREATION_METHOD_THROUGH_ALL() { - static const std::string MY_CREATION_METHOD_ID("ThroughAll"); - return MY_CREATION_METHOD_ID; + static const std::string MY_CREATION_METHOD_THROUGH_ALL("ThroughAll"); + return MY_CREATION_METHOD_THROUGH_ALL; } /// Attribute name for creation method. inline static const std::string& CREATION_METHOD_BY_ANGLES() { - static const std::string MY_CREATION_METHOD_ID("ByAngles"); - return MY_CREATION_METHOD_ID; + static const std::string MY_CREATION_METHOD_BY_ANGLES("ByAngles"); + return MY_CREATION_METHOD_BY_ANGLES; } /// Attribute name for creation method. inline static const std::string& CREATION_METHOD_BY_PLANES() { - static const std::string MY_CREATION_METHOD_ID("ByPlanesAndOffsets"); - return MY_CREATION_METHOD_ID; + static const std::string MY_CREATION_METHOD_BY_PLANES("ByPlanesAndOffsets"); + return MY_CREATION_METHOD_BY_PLANES; } /// Attribute name of an revolution axis. diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index e232d1d89..e54f8c6dd 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -53,8 +53,8 @@ ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent, const Config_WidgetAPI* theData) : QWidget(theParent), myWidgetValidator(0), - myIsEditing(false), myState(Stored), + myIsEditing(false), myIsValueStateBlocked(false), myFlushUpdateBlocked(false) { diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 73de512dd..de0aae6fa 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -441,9 +441,6 @@ protected: /// A feature ID std::string myFeatureId; - /// Flag which shows that current operation is in editing mode - bool myIsEditing; - /// Flag which shows whether current widget is obligatory /// The non-obligatory widgets should not accept the focus in the property panel bool myIsObligatory; @@ -455,6 +452,9 @@ protected: ValueState myState; private: + /// Flag which shows that current operation is in editing mode + bool myIsEditing; + /// Value should be computed on execute, like radius for circle's constraint (can not be zero) bool myIsComputedDefault;