Merge pull request #20058 from tritao/fix-app-document-main-doc-load
App: Fix regression for document creation requests coming from the main document.
This commit is contained in:
@@ -409,9 +409,8 @@ App::Document* ImportOCAF2::getDocument(App::Document* doc, TDF_Label label)
|
||||
return doc;
|
||||
}
|
||||
|
||||
App::DocumentCreateFlags createFlags;
|
||||
createFlags.createView = false;
|
||||
auto newDoc = App::GetApplication().newDocument(name.c_str(), name.c_str(), createFlags);
|
||||
App::DocumentInitFlags initFlags {.createView = false};
|
||||
auto newDoc = App::GetApplication().newDocument(name.c_str(), name.c_str(), initFlags);
|
||||
|
||||
std::ostringstream ss;
|
||||
Base::FileInfo fi(doc->FileName.getValue());
|
||||
|
||||
@@ -595,11 +595,11 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) {
|
||||
recomputeCopy = true;
|
||||
clearCopiedObjects();
|
||||
|
||||
App::DocumentCreateFlags createFlags;
|
||||
createFlags.createView = false;
|
||||
createFlags.temporary = true;
|
||||
|
||||
auto tmpDoc = App::GetApplication().newDocument("_tmp_binder", nullptr, createFlags);
|
||||
App::DocumentInitFlags initFlags {
|
||||
.createView = false,
|
||||
.temporary = true
|
||||
};
|
||||
auto tmpDoc = App::GetApplication().newDocument("_tmp_binder", nullptr, initFlags);
|
||||
tmpDoc->setUndoMode(0);
|
||||
auto objs = tmpDoc->copyObject({ obj }, true, true);
|
||||
if (!objs.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user