X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Document.cpp;h=ec071b40300a35ca2d586f902764a204002897ed;hb=b2a662eec6a0258d51a67ee7e341541e7a710752;hp=d96069a65fcac2111fd5972d2958e98be9d859ac;hpb=24f9658d6e124a268c6a3abcf24f07aa2dc6d268;p=modules%2Fshaper.git diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index d96069a65..ec071b403 100755 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -295,6 +295,10 @@ void Model_Document::close(const bool theForever) mySelectionFeature.reset(); } else { setCurrentFeature(FeaturePtr(), false); // disables all features + // update the OB: features are disabled (on remove of Part) + Events_Loop* aLoop = Events_Loop::loop(); + static Events_ID aDeleteEvent = Events_Loop::eventByName(EVENT_OBJECT_DELETED); + aLoop->flush(aDeleteEvent); } std::static_pointer_cast(Model_Session::get())->setCheckTransactions(true); @@ -866,6 +870,8 @@ const int Model_Document::index(std::shared_ptr theObject) int Model_Document::size(const std::string& theGroupID) { + if (myObjs == 0) // may be on close + return 0; return myObjs->size(theGroupID); }