From 7b7716a3d09dd4532f2580e43039bcf71adb4a97 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 11 Jul 2016 09:40:21 +0300 Subject: [PATCH] #1624 Translation/Rotation/Mirror geometrical constraint are always visible --- src/PartSet/PartSet_Module.cpp | 3 ++- src/PartSet/PartSet_SketcherMgr.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index f357f2541..2473454c7 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -863,7 +863,8 @@ void PartSet_Module::storeConstraintsState(const std::string& theFeatureKind) void PartSet_Module::updateConstraintsState(const std::string& theFeatureKind) { - if (PartSet_SketcherMgr::constraintsIdList().contains(theFeatureKind.c_str())) { + if (PartSet_SketcherMgr::constraintsIdList().contains(theFeatureKind.c_str()) || + PartSet_SketcherMgr::replicationsIdList().contains(theFeatureKind.c_str())) { // Show constraints if a constraint was anOperation mySketchMgr->updateBySketchParameters(PartSet_Tools::Geometrical, true); mySketchMgr->updateBySketchParameters(PartSet_Tools::Dimensional, true); diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 0ae8ae3e5..c6a7a1884 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -1233,9 +1233,11 @@ bool PartSet_SketcherMgr::canDisplayConstraint(const FeaturePtr& theFeature, bool aSwitchedOn = true; const QStringList& aConstrIds = constraintsIdList(); + const QStringList& aReplicationIds = replicationsIdList(); std::string aKind = theFeature->getKind(); - if (aConstrIds.contains(QString(aKind.c_str()))) { + if (aConstrIds.contains(aKind.c_str()) || + aReplicationIds.contains(aKind.c_str())) { bool isTypedConstraint = false; switch (theState) { -- 2.39.2