From cf63a63ae9d28135009792e734e2ab911f119f7f Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Tue, 8 Aug 2017 11:10:43 +0300 Subject: [PATCH] fix opening of workspace file from commandline --- dub.json | 2 +- src/dlangide.d | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dub.json b/dub.json index bff5099..550e941 100644 --- a/dub.json +++ b/dub.json @@ -12,7 +12,7 @@ "stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"], "dependencies": { - "dlangui": "==0.9.85", + "dlangui": "==0.9.86", "dcd": "~>0.9.0" }, diff --git a/src/dlangide.d b/src/dlangide.d index 5c1ea25..8ce8f87 100644 --- a/src/dlangide.d +++ b/src/dlangide.d @@ -88,17 +88,18 @@ extern (C) int UIAppMain(string[] args) { IDEFrame frame = new IDEFrame(window); // Open project, if it specified in command line - if (args.length > 1) + if (args.length > 0) { Action a = ACTION_FILE_OPEN_WORKSPACE.clone(); - a.stringParam = args[1]; + a.stringParam = args[0].toAbsolutePath; frame.handleAction(a); // Mark that workspace opened to prevent auto open frame.isOpenedWorkspace(true); } // open home screen tab - frame.showHomeScreen(); + if (!frame.isOpenedWorkspace) + frame.showHomeScreen(); // for testing: load workspace at startup //frame.openFileOrWorkspace(appendPath(exePath, "../workspaces/sample1/sample1.dlangidews"));