mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Use the position returned from InsertItem, in case the listctrl is sorted and the item is moved to some other location.
This commit is contained in:
@@ -310,8 +310,7 @@ def run():
|
||||
body="""\
|
||||
if len(entry):
|
||||
from six import text_type
|
||||
pos = self.GetItemCount()
|
||||
self.InsertItem(pos, text_type(entry[0]))
|
||||
pos = self.InsertItem(self.GetItemCount(), text_type(entry[0]))
|
||||
for i in range(1, len(entry)):
|
||||
self.SetItem(pos, i, text_type(entry[i]))
|
||||
return pos
|
||||
|
||||
Reference in New Issue
Block a user