diff Lib/lib-tk/Tix.py @ 40354:320dfdee8968 legacy-trunk

Patch #1472877: Fix Tix subwidget name resolution. Will backport to 2.5.
author Martin v. Löwis <martin@v.loewis.de>
date Sat, 18 Nov 2006 18:42:11 +0000
parents 98e81af40007
children 787b969d37f0
line wrap: on
line diff
--- a/Lib/lib-tk/Tix.py	Sat Nov 18 18:05:35 2006 +0000
+++ b/Lib/lib-tk/Tix.py	Sat Nov 18 18:42:11 2006 +0000
@@ -421,7 +421,7 @@
             except:
                 plist = []
 
-        if (not check_intermediate) or len(plist) < 2:
+        if not check_intermediate:
             # immediate descendant
             TixWidget.__init__(self, master, None, None, {'name' : name})
         else:
@@ -437,6 +437,9 @@
                     parent = TixSubWidget(parent, plist[i],
                                           destroy_physically=0,
                                           check_intermediate=0)
+            # The Tk widget name is in plist, not in name
+            if plist:
+                name = plist[-1]
             TixWidget.__init__(self, parent, None, None, {'name' : name})
         self.destroy_physically = destroy_physically