From 1675a0e41aa449e86db3c1edc884d37332352140 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 22 Jan 2016 10:58:24 +0300 Subject: [PATCH] Correction for regressions: sketch result line(green) stayed in the viewer by mouse moving from viewer to property panel; 2nd sketch creation on 1st: 1st sketch is visualized as an argument(yellow) by 1st click in the viewer. --- src/PartSet/PartSet_CustomPrs.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/PartSet/PartSet_CustomPrs.cpp b/src/PartSet/PartSet_CustomPrs.cpp index 373ee6332..fdb2a0f3b 100755 --- a/src/PartSet/PartSet_CustomPrs.cpp +++ b/src/PartSet/PartSet_CustomPrs.cpp @@ -85,7 +85,7 @@ bool PartSet_CustomPrs::displayPresentation( // update the AIS objects content Handle(PartSet_OperationPrs) anOperationPrs = getPresentation(theFlag); // do nothing if the feature can not be displayed [is moved from presentation, to be checked] - if (!myFeature.get() || !myWorkshop->module()->canDisplayObject(myFeature)) + if (!myFeature.get()) return isModified; switch (theFlag) { @@ -105,7 +105,9 @@ bool PartSet_CustomPrs::displayPresentation( // redisplay AIS objects Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext(); if (!aContext.IsNull() && !aContext->IsDisplayed(anOperationPrs)) { - if (anOperationPrs->hasShapes()) { + // when the feature can not be visualized in the module, the operation preview should not + // be visualized also + if (anOperationPrs->hasShapes() && myWorkshop->module()->canDisplayObject(myFeature)) { // set color here because it can be changed in preferences Quantity_Color aShapeColor = getShapeColor(theFlag); anOperationPrs->setShapeColor(aShapeColor); @@ -119,7 +121,9 @@ bool PartSet_CustomPrs::displayPresentation( } } else { - if (!anOperationPrs->hasShapes()) { + // when the feature can not be visualized in the module, the operation preview should not + // be visualized also + if (!anOperationPrs->hasShapes() || !myWorkshop->module()->canDisplayObject(myFeature)) { erasePresentation(theFlag, theUpdateViewer); isModified = true; } -- 2.39.2