gtk2: speedup combobox items insertion

git-svn-id: trunk@22664 -
This commit is contained in:
paul 2009-11-18 03:00:58 +00:00
parent c8ba6e0940
commit 47879f9a9e

View File

@ -618,11 +618,8 @@ begin
if Owner = nil then RaiseGDBException(
'TGtkListStoreStringList.Insert Unspecified owner');
if Index=Count then
gtk_list_store_append(FGtkListStore, @li)
else
gtk_list_store_insert(FGtkListStore, @li, Index);
gtk_list_store_set(FGtkListStore, @li, [FColumnIndex, PChar(S), -1]);
// this call is few times faster than gtk_list_store_insert, gtk_list_store_set
gtk_list_store_insert_with_values(FGtkListStore, @li, Index, FColumnIndex, PChar(S), -1);
IncreaseChangeStamp;
//if the item is inserted before the selected item the