summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2014-11-10 06:23:01 +0000
committerGraeme Geldenhuys <graemeg@gmail.com>2014-11-10 06:23:01 +0000
commit453996807a4806860d30bde520fcc527376f4452 (patch)
treea2cac473271513a42f5df725bc81cd7436350758 /src/gui
parent9e4d0acea3bf53cfe6f0cbb9286068662614da14 (diff)
downloadfpGUI-453996807a4806860d30bde520fcc527376f4452.tar.xz
folder dialog: Seems internal TStringList.Sorted removed duplicates
eg: 'Type1' and 'type1' was considered the same directory under Linux, and only one displayed. This commit fixes the issue and now all directories are displayed.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/selectdirdialog.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/selectdirdialog.inc b/src/gui/selectdirdialog.inc
index 6a96d046..063c7972 100644
--- a/src/gui/selectdirdialog.inc
+++ b/src/gui/selectdirdialog.inc
@@ -135,7 +135,6 @@ begin
begin
try
SortList := TStringList.Create;
- SortList.Sorted := True;
repeat
// check if special file
if (FileInfo.Name = '.') or (FileInfo.Name = '..') or (FileInfo.Name = '') then
@@ -153,10 +152,12 @@ begin
hidden files then do not add it to the list. }
//if ((faHidden and FileInfo.Attr) > 0) and not FShowHidden then
//continue;
-
SortList.Add(FileInfo.Name);
end;
until fpgFindNext(FileInfo) <> 0;
+
+ SortList.Sort;
+
for i := 0 to SortList.Count - 1 do
begin
NewNode := Node.AppendText(SortList[i]);