Fixed Starting app with parameters causing wrong GUI init

This commit is contained in:
Jindra Petřík
2023-03-25 18:30:33 +01:00
parent bfa90f5fcf
commit 49013ed8d3
2 changed files with 2 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
- [#1993] Incorrect scroll position causing shapes to be hidden
- [#1994] Replace command in commandline with three argument causing replacements file load
- [#1477] Open file (Context menu) with unicode characters, unicode in paths, on Windows
- Starting app with parameters causing wrong GUI init
## [18.4.0] - 2023-03-19
### Added

View File

@@ -2709,8 +2709,8 @@ public class Main {
setSessionLoaded(true);
String[] filesToOpen = CommandLineArgumentParser.parseArguments(args);
if (filesToOpen != null && filesToOpen.length > 0) {
initGui();
View.execInEventDispatch(() -> {
initGui();
shouldCloseWhenClosingLoadingDialog = true;
if (Configuration.allowOnlyOneInstance.get() && FirstInstance.openFiles(Arrays.asList(filesToOpen))) { //Try to open in first instance
Main.exit();