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
=== modified file 'softwarecenter/ui/gtk3/panes/installedpane.py'
--- softwarecenter/ui/gtk3/panes/installedpane.py 2012-04-04 16:03:25 +0000
+++ softwarecenter/ui/gtk3/panes/installedpane.py 2012-04-06 23:41:19 +0000
@@ -332,7 +332,11 @@
332 self.app_view.tree_view.map_expanded_rows(332 self.app_view.tree_view.map_expanded_rows(
333 lambda view, path, data: expanded_rows.append(path.to_string()),333 lambda view, path, data: expanded_rows.append(path.to_string()),
334 None)334 None)
335 vadj = self.app_view.tree_view_scroll.get_vadjustment().get_value()335 va = self.app_view.tree_view_scroll.get_vadjustment()
336 if va:
337 vadj = va.get_value()
338 else:
339 vadj = 0
336 return expanded_rows, vadj340 return expanded_rows, vadj
337341
338 def _restore_treeview_state(self, state):342 def _restore_treeview_state(self, state):

Subscribers

People subscribed via source and target branches