mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 22:19:17 +02:00
Fixes a small bug in Qt. ItemIndex didn't work for the last item, for example ItemIndex=15 with 15 items.
git-svn-id: trunk@27717 -
This commit is contained in:
parent
17cbc0d5bf
commit
409c85821c
@ -269,7 +269,9 @@ begin
|
||||
TmpFilter := TmpFilter + ' ' + strExtensions;
|
||||
end;
|
||||
|
||||
if (AFileDialog.FilterIndex > 0) and (List.Count > AFileDialog.FilterIndex) then
|
||||
// Remember that AFileDialog.FilterIndex is a 1-based index and that
|
||||
// List has a zero-based index
|
||||
if (AFileDialog.FilterIndex > 0) and (List.Count >= AFileDialog.FilterIndex) then
|
||||
ASelectedFilter := GetUTF8String(List.Strings[AFileDialog.FilterIndex - 1])
|
||||
else
|
||||
if (List.Count > 0) then
|
||||
|
Loading…
Reference in New Issue
Block a user