if (aPart.get()) {
FeaturePtr aFeature = aRoot->feature(aPart);
if (aFeature) {
- // do remove
- aPart->data()->document(ModelAPI_ResultPart::DOC_REF())->value()->close();
+ // do remove, but don't do real close (features are erased without persistence changes
+ // document remove may be undoed)
+ // aPart->data()->document(ModelAPI_ResultPart::DOC_REF())->value()->close();
std::set<std::shared_ptr<ModelAPI_Feature> > aRefFeatures;
aRoot->refsToFeature(aFeature, aRefFeatures);
if (aRefFeatures.empty()) {
aRoot->removeFeature(aFeature);
- // the redisplay signal should be flushed in order to erase the feature presentation in the viewer
- // after removeFeature from the document
+ // the redisplay signal should be flushed in order to erase the feature presentation
+ // in the viewer after removeFeature from the document
Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY));
}
}