From: Jack Jansen Date: Thu, 27 Nov 2003 23:20:06 +0000 (+0000) Subject: Fix (workaround, actually) for bug #844676: deselecting "show hidden" can X-Git-Tag: v2.3.3c1~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efd0a140b045f7c59bfbf36a1fa1d0f75d8ac0d0;p=thirdparty%2FPython%2Fcpython.git Fix (workaround, actually) for bug #844676: deselecting "show hidden" can cause an index error. We now select the first package if this threatens to happen. Backport of 1.17. --- diff --git a/Mac/Tools/IDE/PackageManager.py b/Mac/Tools/IDE/PackageManager.py index fb482ef16851..4bd0e6200bc7 100755 --- a/Mac/Tools/IDE/PackageManager.py +++ b/Mac/Tools/IDE/PackageManager.py @@ -383,6 +383,8 @@ class PackageBrowser(PimpInterface): self.w.user_button.enable(0) else: sel = sel[0] + if sel >= len(self.packages): + sel = 0 self.w.packagebrowser.setselection([sel]) installed, message = self.getstatus(sel) self.w.installed.set(installed)