eng/ide/gnatstudio#198 Fix for the Gtkada.File_Selector.Select_File

Fixes eng/ide/gnatstudio#198
This commit is contained in:
Andry Ogorodnik
2023-12-13 19:36:51 +02:00
parent e1bd916842
commit 6f83f1bddb
2 changed files with 8 additions and 1 deletions

View File

@@ -15,3 +15,8 @@ def run_test():
gps_assert(tm, ['noext'])
button = get_widget_by_name("file_selector_window.ok_button")
button.clicked()
yield idle_modal_dialog(lambda:
GPS.MDI.file_selector('*.xml', except_filter=''))
dialog = get_window_by_title("Select a file", Gtk.Window.list_toplevels())
get_button_from_label("gtk-cancel", dialog).clicked()

View File

@@ -698,7 +698,9 @@ package body Gtkada.File_Selector is
Fo := 0;
end if;
if Pattern_Name (Nl) = ';' then
if Nl in Pattern_Name'Range
and then Pattern_Name (Nl) = ';'
then
No := 1;
else
No := 0;