From 536526185b2f85b9d0755d70a492fbe399807c95 Mon Sep 17 00:00:00 2001 From: default0 Date: Tue, 22 Dec 2015 15:47:19 +0100 Subject: [PATCH] Fix scrollbar of FileDialog not updating If you change the opened directory in the FileDialog and opened a directory with enough contents to require a scrollbar, the scrollbar would not show up until you first scrolled. This commit fixes this by updating the scrollbar whenever the displayed directory of the FileDialog changes. --- src/dlangui/dialogs/filedlg.d | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dlangui/dialogs/filedlg.d b/src/dlangui/dialogs/filedlg.d index 7e1219eb..b7881fdd 100644 --- a/src/dlangui/dialogs/filedlg.d +++ b/src/dlangui/dialogs/filedlg.d @@ -227,6 +227,9 @@ class FileDialog : Dialog, CustomGridCellAdapter { _fileList.setCellText(2, i, toUTF32(sz)); _fileList.setCellText(3, i, toUTF32(date)); } + if(_fileList.height > 0) + _fileList.scrollTo(0, 0); + _fileList.autoFitColumnWidths(); _fileList.fillColumnWidth(1); if (selectionIndex >= 0)