From 72da1239bb8a8c8f9d7b08d6c8322b0e6f79b7de Mon Sep 17 00:00:00 2001 From: and3md Date: Thu, 7 Sep 2017 19:40:54 +0200 Subject: [PATCH] FileDialog: Fix open directory by "Open" button - get the name from EditLine not activate selected item. --- src/dlangui/dialogs/filedlg.d | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dlangui/dialogs/filedlg.d b/src/dlangui/dialogs/filedlg.d index f6d6cbea..f2896c13 100644 --- a/src/dlangui/dialogs/filedlg.d +++ b/src/dlangui/dialogs/filedlg.d @@ -631,9 +631,8 @@ class FileDialog : Dialog, CustomGridCellAdapter { _filename = _path ~ dirSeparator ~ baseFilename; if (action.id != StandardAction.OpenDirectory && exists(_filename) && isDir(_filename)) { - // directory selected but we need file so open directory - auto row = _fileList.row(); - onItemActivated(row); + // directory name in _edFileName.text but we need file so open directory + openDirectory(_filename, null); return true; } else if (baseFilename.length > 0) { Action result = _action;