From: nds Date: Tue, 31 May 2016 05:58:44 +0000 (+0300) Subject: Avoid show for all dimensional/geometrical constraints on edit X-Git-Tag: V_2.3.1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=385b848893c8404c215cdc3e8cd7c4d91910ba12;p=modules%2Fshaper.git Avoid show for all dimensional/geometrical constraints on edit --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 29948541d..936a1ab01 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -825,6 +825,8 @@ bool PartSet_Module::canCommitOperation() const void PartSet_Module::launchOperation(const QString& theCmdId) { storeConstraintsState(theCmdId.toStdString()); + updateConstraintsState(theCmdId.toStdString()); + ModuleBase_IModule::launchOperation(theCmdId); } @@ -836,6 +838,10 @@ void PartSet_Module::storeConstraintsState(const std::string& theFeatureKind) mySketchMgr->showConstraintStates(); myHasConstraintShown = aShownStates; } +} + +void PartSet_Module::updateConstraintsState(const std::string& theFeatureKind) +{ if (PartSet_SketcherMgr::constraintsIdList().contains(theFeatureKind.c_str())) { // Show constraints if a constraint was anOperation mySketchMgr->updateBySketchParameters(PartSet_Tools::Geometrical, true); diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index 237fd817b..f6d8fa921 100755 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -355,6 +355,11 @@ protected: /// \param theFeatureKindId a feature kind void storeConstraintsState(const std::string& theFeatureKindId); + /// If the feature kind is a geometrical or dimensional constraint, set visible state for + /// all types of constraints + /// \param theFeatureKindId a feature kind + void updateConstraintsState(const std::string& theFeatureKind); + /// Register validators for this module virtual void registerValidators();