Merge pull request #1030 from RobinD42/fix-issue906

Fix wx.ListCtrl.Append when wx.LC_SORT style is used

(cherry picked from commit 7b6fbf2a52)
This commit is contained in:
Robin Dunn
2018-10-09 12:13:20 +08:00
parent e215a1df7e
commit 0cfefbbd47
2 changed files with 5 additions and 3 deletions

View File

@@ -314,8 +314,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