]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #894: Preserve constraint visibility state after operation finish
authorvsv <vitaly.smetannikov@opencascade.com>
Fri, 11 Sep 2015 13:08:44 +0000 (16:08 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Fri, 11 Sep 2015 13:08:58 +0000 (16:08 +0300)
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_Module.h

index c0401c517e8d9304527b05e5b5cf43c118ef465b..f873be21aef48d0223df7d8e448db5492a06be7b 100755 (executable)
@@ -122,7 +122,7 @@ extern "C" PARTSET_EXPORT ModuleBase_IModule* createModule(ModuleBase_IWorkshop*
 
 PartSet_Module::PartSet_Module(ModuleBase_IWorkshop* theWshop)
   : ModuleBase_IModule(theWshop),
-  myRestartingMode(RM_None), myVisualLayerId(0)
+  myRestartingMode(RM_None), myVisualLayerId(0), myHasConstraintShown(true)
 {
   new PartSet_IconFactory();
 
@@ -324,6 +324,7 @@ void PartSet_Module::onOperationStopped(ModuleBase_Operation* theOperation)
     XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer();
     aDisplayer->updateViewer();
   }
+  mySketchMgr->onShowConstraintsToggle(myHasConstraintShown);
 }
 
 ModuleBase_Operation* PartSet_Module::currentOperation() const
@@ -762,6 +763,7 @@ void PartSet_Module::launchOperation(const QString& theCmdId)
 {
   if (PartSet_SketcherMgr::constraintsIdList().contains(theCmdId)) {
     // Show constraints if a constraint was anOperation
+    myHasConstraintShown = mySketchMgr->isConstraintsShown();
     mySketchMgr->onShowConstraintsToggle(true);
   }
   ModuleBase_IModule::launchOperation(theCmdId);
index 9746f4356852b0250203d9cd1067e4fb22b22802..f43efaf94702da0da6957f2595f59f13917c6693 100644 (file)
@@ -286,6 +286,7 @@ protected slots:
   PartSet_CustomPrs* myCustomPrs;
   int myVisualLayerId;
 
+  bool myHasConstraintShown;
 #ifdef ModuleDataModel
   PartSet_DocumentDataModel* myDataModel;
 #endif