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

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

Description of the change

Small fix for a crash that can happen during the installed view treeview initialization. There should be no side effects from this fix as even if the vadustment value is None, with this fix the scroll will be set at the top, right where it should be for initialization anyway.

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

Thanks, looks good!

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 22:51:20 +0000
@@ -340,8 +340,10 @@
340 for ind in expanded_rows:340 for ind in expanded_rows:
341 path = Gtk.TreePath.new_from_string(ind)341 path = Gtk.TreePath.new_from_string(ind)
342 self.app_view.tree_view.expand_row(path, False)342 self.app_view.tree_view.expand_row(path, False)
343 self.app_view.tree_view_scroll.get_vadjustment().set_lower(vadj)343 va = self.app_view.tree_view_scroll.get_vadjustment()
344 self.app_view.tree_view_scroll.get_vadjustment().set_value(vadj)344 if va:
345 va.set_lower(vadj)
346 va.set_value(vadj)
345347
346 #~ @interrupt_build_and_wait348 #~ @interrupt_build_and_wait
347 def _build_categorised_installedview(self, keep_state=False):349 def _build_categorised_installedview(self, keep_state=False):

Subscribers

People subscribed via source and target branches