mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 23:49:28 +02:00
LCL-Gtk2: Fix handling selection of simple listview in icon mode, issue #40563. Based on patch by Anton Kavalenka.
Actually it was a regression aftered5ff63cf4
. (cherry picked from commit1c3d963184
)
This commit is contained in:
parent
b332764d30
commit
688188fe5c
@ -367,19 +367,15 @@ var
|
||||
begin
|
||||
Widgets := PTVWidgets(WidgetInfo^.UserData);
|
||||
|
||||
if Length(Widgets^.ItemCache)=0 then
|
||||
List := gtk_icon_view_get_selected_items(AIconView);
|
||||
if (List <> nil) then
|
||||
begin
|
||||
List := gtk_icon_view_get_selected_items(AIconView);
|
||||
if (List <> nil) then
|
||||
begin
|
||||
Path := PGtkTreePath(g_list_first(List)^.data);
|
||||
Indices := gtk_tree_path_get_indices(path)^;
|
||||
ChangeItemCache(Widgets, Indices, tvisUnselected);
|
||||
g_list_free(List);
|
||||
end else
|
||||
exit;
|
||||
Path := PGtkTreePath(g_list_first(List)^.data);
|
||||
Indices := gtk_tree_path_get_indices(path)^;
|
||||
ChangeItemCache(Widgets, Indices, tvisUnselected);
|
||||
g_list_free(List);
|
||||
end else
|
||||
Exit;
|
||||
exit;
|
||||
|
||||
// LCL already sent selection !
|
||||
if wwiInvalidEvent in Widgets^.WidgetInfo^.Flags then
|
||||
|
Loading…
Reference in New Issue
Block a user