mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 00:00:49 +01:00
Fixed bug #9578 which duplicated items in a listview when items are added before the handle is allocated and there are at least on column added
git-svn-id: trunk@12452 -
This commit is contained in:
parent
d430697f03
commit
3583729c19
@ -254,6 +254,10 @@ i,x: Integer;
|
||||
Item: TListItem;
|
||||
begin
|
||||
GetCommonTreeViewWidgets(PGtkWidget(ALV.Handle), Widgets);
|
||||
|
||||
// needed for when we are creating so items in the ListView are not added twice
|
||||
if gtk_tree_model_iter_n_children(GTK_TREE_MODEL(Widgets^.TreeModel), nil) = 0 then
|
||||
Exit;
|
||||
|
||||
gtk_list_store_clear(PGtkListStore(Widgets^.TreeModel));
|
||||
for i := 0 to TLVHack(ALV).Items.Count-1 do begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user