From: nds Date: Fri, 22 Jan 2016 07:58:24 +0000 (+0300) Subject: Correction for regressions: sketch result line(green) stayed in the viewer by mouse... X-Git-Tag: V_2.2.0~183 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1675a0e41aa449e86db3c1edc884d37332352140;p=modules%2Fshaper.git 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. --- 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; }