From d51e05396c258fe50f143051fff0806f13851403 Mon Sep 17 00:00:00 2001 From: Keywan Ghadami Date: Tue, 29 Dec 2015 08:49:37 +0100 Subject: [PATCH] minor improvement for file-dialog if the user selects no file and press the open button: the dialog will (instead of closing itself) now open the selected directory --- src/dlangui/dialogs/filedlg.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dlangui/dialogs/filedlg.d b/src/dlangui/dialogs/filedlg.d index b3c1edd7..ff1afa95 100644 --- a/src/dlangui/dialogs/filedlg.d +++ b/src/dlangui/dialogs/filedlg.d @@ -368,6 +368,10 @@ class FileDialog : Dialog, CustomGridCellAdapter { result.stringParam = _filename; close(result); return true; + } else if (_filename.length == 0){ + auto row = _fileList.row(); + onItemActivated(row); + return true; } } return super.handleAction(action);