Merge lp:~gary-lasker/software-center/fix-crash-lp969737 into lp:software-center

Proposed by Gary Lasker
Status: Merged
Merged at revision: 2948
Proposed branch: lp:~gary-lasker/software-center/fix-crash-lp969737
Merge into: lp:software-center
Diff against target: 16 lines (+5/-1)
1 file modified
softwarecenter/ui/gtk3/panes/installedpane.py (+5/-1)
To merge this branch: bzr merge lp:~gary-lasker/software-center/fix-crash-lp969737
Reviewer Review Type Date Requested Status
Michael Vogt Approve
Review via email: mp+101161@code.launchpad.net

Description of the change

This branch fixes bug 969737, an intermittent crash that can occur when saving the vertical position of the installed pane treeview on a cache refresh. Side effect if the error condition occurs is minimal, the treeview is simply restored at the top of the pane. The state of the expanded nodes, etc., is retained.

Many thanks!

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for this fix!

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/panes/installedpane.py'
2--- softwarecenter/ui/gtk3/panes/installedpane.py 2012-04-04 16:03:25 +0000
3+++ softwarecenter/ui/gtk3/panes/installedpane.py 2012-04-06 23:41:19 +0000
4@@ -332,7 +332,11 @@
5 self.app_view.tree_view.map_expanded_rows(
6 lambda view, path, data: expanded_rows.append(path.to_string()),
7 None)
8- vadj = self.app_view.tree_view_scroll.get_vadjustment().get_value()
9+ va = self.app_view.tree_view_scroll.get_vadjustment()
10+ if va:
11+ vadj = va.get_value()
12+ else:
13+ vadj = 0
14 return expanded_rows, vadj
15
16 def _restore_treeview_state(self, state):

Subscribers

People subscribed via source and target branches