]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid show for all dimensional/geometrical constraints on edit
authornds <nds@opencascade.com>
Tue, 31 May 2016 05:58:44 +0000 (08:58 +0300)
committernds <nds@opencascade.com>
Tue, 31 May 2016 05:59:16 +0000 (08:59 +0300)
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h

index 29948541da0becfe38e48255609b863be276c0ee..936a1ab0150b15775116c99dbbdb3e6cc6221d82 100755 (executable)
@@ -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);
index 237fd817bfb249e6c98cf1ca72f03c1102eee529..f6d8fa9210ff5e3dc27fec135e5f0a6f9f2e8fc1 100755 (executable)
@@ -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();