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:
andrew 2007-10-14 01:27:15 +00:00
parent d430697f03
commit 3583729c19

View File

@ -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