From: vsv Date: Fri, 11 Sep 2015 13:08:44 +0000 (+0300) Subject: Issue #894: Preserve constraint visibility state after operation finish X-Git-Tag: V_1.4.0_beta4~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d758dbc3b741774d5033acbcda7d8cef49599fda;p=modules%2Fshaper.git Issue #894: Preserve constraint visibility state after operation finish --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index c0401c517..f873be21a 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -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); diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index 9746f4356..f43efaf94 100644 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -286,6 +286,7 @@ protected slots: PartSet_CustomPrs* myCustomPrs; int myVisualLayerId; + bool myHasConstraintShown; #ifdef ModuleDataModel PartSet_DocumentDataModel* myDataModel; #endif