From: vsv Date: Tue, 29 Jul 2014 12:27:08 +0000 (+0400) Subject: Hide result on sketch editing X-Git-Tag: V_0.4.4~132 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=697b88ac0f176aa1fa6e496eb2b9534756385003;p=modules%2Fshaper.git Hide result on sketch editing --- diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 1391a0b2f..8ceabc22e 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -285,8 +285,7 @@ void PartSet_Module::onLaunchOperation(std::string theName, ObjectPtr theObject) ModuleBase_Operation* anOperation = createOperation(theName.c_str(), aFeature ? aFeature->getKind() : ""); PartSet_OperationSketchBase* aPreviewOp = dynamic_cast(anOperation); - if (aPreviewOp) - { + if (aPreviewOp) { XGUI_Selection* aSelection = myWorkshop->selector()->selection(); // Initialise operation with preliminary selection std::list aSelected = aSelection->getSelected(); @@ -523,8 +522,14 @@ void PartSet_Module::updateCurrentPreview(const std::string& theCmdId) if (!aFeature || aFeature->getKind() != theCmdId) return; - std::list aList = aPreviewOp->subFeatures(); XGUI_Displayer* aDisplayer = myWorkshop->displayer(); + // Hide result of sketch + std::list aResults = aFeature->results(); + std::list::const_iterator aIt; + for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt) + aDisplayer->erase(*aIt, false); + + std::list aList = aPreviewOp->subFeatures(); std::list aModes = aPreviewOp->getSelectionModes(aPreviewOp->feature()); std::list::const_iterator anIt = aList.begin(),