mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 06:18:49 +02:00
gtk2: speedup combobox items insertion
git-svn-id: trunk@22664 -
This commit is contained in:
parent
c8ba6e0940
commit
47879f9a9e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user