From 876c65157da2b6894076d81a114bb92b579c9e5d Mon Sep 17 00:00:00 2001 From: mwganson Date: Sat, 6 Oct 2018 00:43:04 -0500 Subject: [PATCH] issue 3443, suppress generation of new document when documents are loaded via command line --- src/Gui/MainWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 58a31e9836..e3a60af34e 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -1071,7 +1071,9 @@ void MainWindow::delayedStartup() // Create new document? ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("Document"); if (hGrp->GetBool("CreateNewDoc", false)) { - App::GetApplication().newDocument(); + if (App::GetApplication().getDocuments().size()==0){ + App::GetApplication().newDocument(); + } } if (hGrp->GetBool("RecoveryEnabled", true)) {