From ac5d667e9f1b79b0d0ca6f5c8edd4f02feecd98f Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Thu, 27 Nov 2003 23:19:33 +0000 Subject: [PATCH] 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. Will backport. --- Mac/Tools/IDE/PackageManager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mac/Tools/IDE/PackageManager.py b/Mac/Tools/IDE/PackageManager.py index fb482ef1685..4bd0e6200bc 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)