wix: scrolling is not reseted anymore when clicking on a group on contact list
This commit is contained in:
parent
d6ae995bd6
commit
c95e8a4e70
1 changed files with 2 additions and 0 deletions
|
|
@ -147,6 +147,7 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
|
||||||
"""Called when a contact is selected."""
|
"""Called when a contact is selected."""
|
||||||
data = self.getSelection()
|
data = self.getSelection()
|
||||||
if data == None: #we have a group
|
if data == None: #we have a group
|
||||||
|
first_visible = self.GetVisibleBegin()
|
||||||
group = self.GetClientData(self.GetSelection())
|
group = self.GetClientData(self.GetSelection())
|
||||||
erased = self.__eraseGroup(group)
|
erased = self.__eraseGroup(group)
|
||||||
if not erased: #the group was already erased, we can add again the contacts
|
if not erased: #the group was already erased, we can add again the contacts
|
||||||
|
|
@ -156,6 +157,7 @@ class ContactList(wx.SimpleHtmlListBox, QuickContactList):
|
||||||
for contact in contacts:
|
for contact in contacts:
|
||||||
self.Insert(self.__presentItem(contact), id_insert, contact)
|
self.Insert(self.__presentItem(contact), id_insert, contact)
|
||||||
self.SetSelection(wx.NOT_FOUND)
|
self.SetSelection(wx.NOT_FOUND)
|
||||||
|
self.ScrollToLine(first_visible)
|
||||||
event.Skip(False)
|
event.Skip(False)
|
||||||
else:
|
else:
|
||||||
event.Skip()
|
event.Skip()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue