Salome HOME
Restore selection in the viewer by multi selector widget activation.
[modules/shaper.git] / src / ModelAPI / ModelAPI_Feature.cpp
index b08640fdaca719c62267526845c5dd7de5f5fa11..d9533e83e33d17c570bcc013ab65332f3be084dd 100644 (file)
@@ -128,13 +128,15 @@ void ModelAPI_Feature::eraseResults()
     // flush it to avoid left presentations after input of invalid arguments (radius=0)
     static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED);
     Events_Loop::loop()->flush(anEvent);
+    Events_Loop::loop()->flush(EVENT_DISP);
   }
 }
 
-std::shared_ptr<ModelAPI_Document> ModelAPI_Feature::documentToAdd()
+const std::string& ModelAPI_Feature::documentToAdd()
 {
-  // null pointer t ouse the current document
-  return std::shared_ptr<ModelAPI_Document>();
+  // empty to use the current document
+  static const std::string anEmpty;
+  return anEmpty;
 }
 
 void ModelAPI_Feature::erase()