From a836c7eca9d4e065be286a4f65e8a9efb044330c Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Mon, 30 Jun 2008 22:23:07 +0000 Subject: [PATCH] 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 --- src/roster_window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 8ac3d205d..df3bee1a3 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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)