+ if (theDoc.get() && theSendSignal) {
+ // syncronize the document: it may be just opened or opened but removed before
+ std::shared_ptr<Model_Document> aDoc = std::dynamic_pointer_cast<Model_Document>(theDoc);
+ if (aDoc.get()) {
+ bool aWasChecked = myCheckTransactions;
+ setCheckTransactions(false);
+ aDoc->synchronizeFeatures(false, true);
+ if (aWasChecked)
+ setCheckTransactions(true);
+ }
+ static std::shared_ptr<Events_Message> aMsg(
+ new Events_Message(Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED)));