From 385b848893c8404c215cdc3e8cd7c4d91910ba12 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 31 May 2016 08:58:44 +0300 Subject: [PATCH] Avoid show for all dimensional/geometrical constraints on edit --- src/PartSet/PartSet_Module.cpp | 6 ++++++ src/PartSet/PartSet_Module.h | 5 +++++ 2 files changed, 11 insertions(+) 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(); -- 2.39.2