From 697b88ac0f176aa1fa6e496eb2b9534756385003 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 29 Jul 2014 16:27:08 +0400 Subject: [PATCH] Hide result on sketch editing --- src/PartSet/PartSet_Module.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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(), -- 2.39.2