Merge lp:~mvo/software-center/lp969050 into lp:software-center

Proposed by Michael Vogt on 2012-03-30
Status: Merged
Merged at revision: 2937
Proposed branch: lp:~mvo/software-center/lp969050
Merge into: lp:software-center
Diff against target: 19 lines (+8/-1)
1 file modified
softwarecenter/ui/gtk3/widgets/ (+8/-1)
To merge this branch: bzr merge lp:~mvo/software-center/lp969050
Reviewer Review Type Date Requested Status
Kiwinote 2012-03-30 Approve on 2012-03-30
Review via email:

Description of the change

This branch fixes another GtkTreeView releated issue. The cursor_changed signal is called very often
currently leading to odd results in _update_selected_row and when doing multiple searches.

To reproduce:
- open software-center
- search for "foo"
- select one of the search results
- search for "bar"

This will show a expanded row in trunk but a unexpanded one with this branch.

To post a comment you must log in.
Kiwinote (kiwinote) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'softwarecenter/ui/gtk3/widgets/'
2--- softwarecenter/ui/gtk3/widgets/ 2012-03-30 07:26:46 +0000
3+++ softwarecenter/ui/gtk3/widgets/ 2012-03-30 10:44:27 +0000
4@@ -134,7 +134,14 @@
5 self.expanded_path = None
6 self._needs_collapse = []
7 if self.appmodel:
8- self.appmodel.clear()
9+ # before clearing the model, disconnect it from the view. this
10+ # avoids that the model gets a "cursor_changed" signal for each
11+ # removed row and consequently that _update_selected_row is called
12+ # for rows that are not really selected (LP: #969050)
13+ model = self.get_model()
14+ self.set_model(None)
15+ model.clear()
16+ self.set_model(model)
18 def expand_path(self, path):
19 if path is not None and not isinstance(path, Gtk.TreePath):


People subscribed via source and target branches