mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 01:50:56 +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
@ -255,6 +255,10 @@ 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
|
||||
Item := TLVHack(ALV).Items.Item[i];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user