You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/lazarus/files/lazarus-0.9.28.2-bug0015627...

31 lines
918 B

--- trunk/lcl/interfaces/gtk2/gtk2wsstdctrls.pp 2009/12/08 12:38:50 23028
+++ trunk/lcl/interfaces/gtk2/gtk2wsstdctrls.pp 2010/02/12 02:22:04 23695
@@ -477,16 +477,6 @@
WidgetInfo: PWidgetInfo;
Selection: PGtkTreeSelection;
Path: PGtkTreePath;
-
- procedure ClearCursor; inline;
- begin
- if gtk_tree_row_reference_valid(PGtkTreeView(Widget)^.priv^.cursor) then
- begin
- gtk_tree_row_reference_free(PGtkTreeView(Widget)^.priv^.cursor);
- PGtkTreeView(Widget)^.priv^.cursor := nil;
- end;
- end;
-
begin
if not WSCheckHandleAllocated(ACustomListBox, 'SetItemIndex') then
Exit;
@@ -512,7 +502,9 @@
end
else
begin
- ClearCursor;
+ Path := gtk_tree_path_new_from_indices(0, -1);
+ if PGtkTreeView(Widget)^.priv^.tree <> nil then
+ gtk_tree_view_set_cursor(PGtkTreeView(Widget), Path, nil, False);
gtk_tree_selection_unselect_all(Selection);
end;