]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix (workaround, actually) for bug #844676: deselecting "show hidden" can
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 27 Nov 2003 23:19:33 +0000 (23:19 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 27 Nov 2003 23:19:33 +0000 (23:19 +0000)
cause an index error. We now select the first package if this threatens
to happen. Will backport.

Mac/Tools/IDE/PackageManager.py

index fb482ef16851bfc3d77f125fa0173c0dcbe05480..4bd0e6200bc72e7155fa99535b125f09d43cee94 100755 (executable)
@@ -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)