From 5c72e879c14981ebaee76cbff401dd2b83f28bee Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Fri, 8 Sep 2017 15:29:07 +0300 Subject: [PATCH] additional fix for #257 --- src/dlangide/ui/frame.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dlangide/ui/frame.d b/src/dlangide/ui/frame.d index 6ae9f7c..6dac2b8 100644 --- a/src/dlangide/ui/frame.d +++ b/src/dlangide/ui/frame.d @@ -1233,11 +1233,14 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL } + /// add new file to project void addProjectItem(Object obj) { if (currentWorkspace is null) return; - if (obj is null && _wsPanel !is null) { + if (obj is null && _wsPanel !is null && !currentEditorSourceFile) { obj = _wsPanel.selectedProjectItem; + if (!obj) + obj = currentWorkspace.startupProject; } Project project; ProjectFolder folder;