mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-10 09:38:22 +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(
|
if Owner = nil then RaiseGDBException(
|
||||||
'TGtkListStoreStringList.Insert Unspecified owner');
|
'TGtkListStoreStringList.Insert Unspecified owner');
|
||||||
|
|
||||||
if Index=Count then
|
// this call is few times faster than gtk_list_store_insert, gtk_list_store_set
|
||||||
gtk_list_store_append(FGtkListStore, @li)
|
gtk_list_store_insert_with_values(FGtkListStore, @li, Index, FColumnIndex, PChar(S), -1);
|
||||||
else
|
|
||||||
gtk_list_store_insert(FGtkListStore, @li, Index);
|
|
||||||
gtk_list_store_set(FGtkListStore, @li, [FColumnIndex, PChar(S), -1]);
|
|
||||||
IncreaseChangeStamp;
|
IncreaseChangeStamp;
|
||||||
|
|
||||||
//if the item is inserted before the selected item the
|
//if the item is inserted before the selected item the
|
||||||
|
Loading…
Reference in New Issue
Block a user