From 0a3c4050f8f6bb19911646c40f57342b5cb44811 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 4 May 2016 12:25:37 +0300 Subject: [PATCH] #1454 Constraints visibility in sketch --- src/PartSet/PartSet_Module.cpp | 15 +++++++++++---- src/PartSet/PartSet_Module.h | 5 +++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 9ad6a8e00..ab3bca3ca 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -148,9 +148,7 @@ PartSet_Module::PartSet_Module(ModuleBase_IWorkshop* theWshop) mySelectionFilters.Append(new PartSet_GlobalFilter(myWorkshop)); mySelectionFilters.Append(new PartSet_FilterInfinite(myWorkshop)); - myHasConstraintShown[PartSet_Tools::Geometrical] = true; - myHasConstraintShown[PartSet_Tools::Dimensional] = true; - myHasConstraintShown[PartSet_Tools::Expressions] = false; + setDefaultConstraintShown(); Config_PropManager::registerProp("Visualization", "operation_parameter_color", "Reference shape wireframe color in operation", Config_Prop::Color, @@ -394,6 +392,8 @@ void PartSet_Module::operationStopped(ModuleBase_Operation* theOperation) if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) { mySketchMgr->stopNestedSketch(theOperation); } + else if (PartSet_SketcherMgr::isSketchOperation(theOperation)) + setDefaultConstraintShown(); //VSV: Viewer is updated on feature update and redisplay if (isModified) { @@ -405,7 +405,6 @@ void PartSet_Module::operationStopped(ModuleBase_Operation* theOperation) QMap::const_iterator anIt = myHasConstraintShown.begin(), aLast = myHasConstraintShown.end(); for (; anIt != aLast; anIt++) { - myHasConstraintShown[anIt.key()]; mySketchMgr->updateBySketchParameters(anIt.key(), anIt.value()); } } @@ -1315,3 +1314,11 @@ XGUI_Workshop* PartSet_Module::getWorkshop() const XGUI_ModuleConnector* aConnector = dynamic_cast(workshop()); return aConnector->workshop(); } + +//****************************************************** +void PartSet_Module::setDefaultConstraintShown() +{ + myHasConstraintShown[PartSet_Tools::Geometrical] = true; + myHasConstraintShown[PartSet_Tools::Dimensional] = true; + myHasConstraintShown[PartSet_Tools::Expressions] = false; +} diff --git a/src/PartSet/PartSet_Module.h b/src/PartSet/PartSet_Module.h index b5aed0bdd..925dc1760 100755 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@ -376,14 +376,15 @@ protected: void onActiveDocPopup(const QPoint&); private: - //! Delete features virtual bool deleteObjects(); /// Returns the workshop XGUI_Workshop* getWorkshop() const; - private: + void setDefaultConstraintShown(); + +private: SelectMgr_ListOfFilter mySelectionFilters; PartSet_SketcherMgr* mySketchMgr; -- 2.39.2