]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Hide result on sketch editing
authorvsv <vitaly.smetannikov@opencascade.com>
Tue, 29 Jul 2014 12:27:08 +0000 (16:27 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Tue, 29 Jul 2014 12:27:08 +0000 (16:27 +0400)
src/PartSet/PartSet_Module.cpp

index 1391a0b2fff8eec3bc01716c31a0e37285316bca..8ceabc22eb944ac2ed90eddebe7661d874bec4a8 100644 (file)
@@ -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<PartSet_OperationSketchBase*>(anOperation);
-  if (aPreviewOp)
-  {
+  if (aPreviewOp) {
     XGUI_Selection* aSelection = myWorkshop->selector()->selection();
     // Initialise operation with preliminary selection
     std::list<ModuleBase_ViewerPrs> aSelected = aSelection->getSelected();
@@ -523,8 +522,14 @@ void PartSet_Module::updateCurrentPreview(const std::string& theCmdId)
   if (!aFeature || aFeature->getKind() != theCmdId)
     return;
 
-  std::list<FeaturePtr> aList = aPreviewOp->subFeatures();
   XGUI_Displayer* aDisplayer = myWorkshop->displayer();
+  // Hide result of sketch
+  std::list<ResultPtr> aResults = aFeature->results();
+  std::list<ResultPtr>::const_iterator aIt;
+  for (aIt = aResults.cbegin(); aIt != aResults.cend(); ++aIt)
+    aDisplayer->erase(*aIt, false);
+
+  std::list<FeaturePtr> aList = aPreviewOp->subFeatures();
   std::list<int> aModes = aPreviewOp->getSelectionModes(aPreviewOp->feature());
 
   std::list<FeaturePtr>::const_iterator anIt = aList.begin(),