Commit 71560f3b authored by Dan Pascu's avatar Dan Pascu

Fixed a bug introduced by a recent fix to group ordering

parent 791d2e70
...@@ -2493,6 +2493,7 @@ class ContactModel(QAbstractListModel): ...@@ -2493,6 +2493,7 @@ class ContactModel(QAbstractListModel):
def _NH_SIPApplicationDidStart(self, notification): def _NH_SIPApplicationDidStart(self, notification):
self.state = 'started' self.state = 'started'
self._update_group_positions()
def _NH_SIPApplicationWillEnd(self, notification): def _NH_SIPApplicationWillEnd(self, notification):
self.state = 'stopping' self.state = 'stopping'
...@@ -2694,6 +2695,8 @@ class ContactModel(QAbstractListModel): ...@@ -2694,6 +2695,8 @@ class ContactModel(QAbstractListModel):
return position return position
def _find_group_insertion_point(self, group): def _find_group_insertion_point(self, group):
if group.settings.position is None:
return 0 # insert new groups at the top
for item in self.items[GroupList]: for item in self.items[GroupList]:
if item.relocation_info is None and item.settings.position >= group.settings.position: if item.relocation_info is None and item.settings.position >= group.settings.position:
position = self.items.index(item) position = self.items.index(item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment