Fix really bad modelfilter bug that may have caused segfaults.

This also fixes the problem of showing the wrong icon when expanding metacontacts.

Example:
We have the groups A, B, C in our child model
But only A and C are visible (and therefore in modelfilter)

Imagine we have a childIter_G pointing to group B
Getting its path in the childmodel, will give us (lets say) 2
2 means now the second group/row in the CHILD model
We now pass this to the tree and tell him "Expand row 2"
The tree itself is looking at the 2nd row of modelfilter: "Hey modelfilter, expand row number 2"

For modelfilter row number 2 is C and NOT B
This commit is contained in:
Stephan Erb 2008-06-30 22:23:07 +00:00
parent a1f595b78f
commit a836c7eca9
1 changed files with 2 additions and 2 deletions

View File

@ -906,7 +906,6 @@ class RosterWindow:
account_name = account
accounts = [account]
path = self.model.get_path(child_iter)
if account in self.collapsed_rows and \
self.model.iter_has_child(child_iter):
account_name = '[%s]' % account_name
@ -1057,7 +1056,8 @@ class RosterWindow:
if have_visible_children:
# We are the big brother and have a visible family
for child_iter in child_iters:
path = self.model.get_path(child_iter)
child_path = self.model.get_path(child_iter)
path = self.modelfilter.convert_child_path_to_path(child_path)
if not self.tree.row_expanded(path) and icon_name != 'event':
iterC = self.model.iter_children(child_iter)