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:
Chris Hennes
2025-03-07 23:28:27 +00:00
committed by GitHub
6 changed files with 35 additions and 32 deletions

View File

@@ -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()) {