From c18e5e7cae151412e029020a4103e85ae64eb190 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 22 Apr 2016 16:09:56 +0300 Subject: [PATCH] Sketch delete problem: it is not possible to delete dimensional constraint --- src/PartSet/PartSet_Module.cpp | 3 +-- src/PartSet/PartSet_SketcherMgr.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index e2e1f3600..9ad6a8e00 100755 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -966,8 +966,7 @@ bool PartSet_Module::customisePresentation(ResultPtr theResult, AISObjectPtr the if (aColor.empty()) XGUI_CustomPrs::getDefaultColor(anObject, true, aColor); if (!aColor.empty()) { - thePrs->setColor(aColor[0], aColor[1], aColor[2]); - aCustomized = true; + aCustomized = thePrs->setColor(aColor[0], aColor[1], aColor[2]); } } diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index be2d63ec4..2b19b4c70 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -1692,10 +1692,12 @@ void PartSet_SketcherMgr::updateBySketchParameters( } break; case PartSet_Tools::Expressions: { - /// call all sketch features redisplay, the expression state will be corrected in customize - /// of distance presentation - Events_ID anEventId = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY); - PartSet_Tools::sendSubFeaturesEvent(myCurrentSketch, anEventId); + if (aPrevState != theState) { + /// call all sketch features redisplay, the expression state will be corrected in customize + /// of distance presentation + Events_ID anEventId = Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY); + PartSet_Tools::sendSubFeaturesEvent(myCurrentSketch, anEventId); + } } break; } -- 2.39.2