summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-10-16 21:10:12 (GMT)
committerGuido van Rossum <guido@python.org>1998-10-16 21:10:12 (GMT)
commit179c36e411f0924c0c2cb08f848807bb7c6f03d6 (patch)
tree602ce11e63688785568c76b100f63ed04ac6e49b /Tools
parentadfe773d2c0ab1aa9f692956ed8f7fec0caaf940 (diff)
downloadcpython-179c36e411f0924c0c2cb08f848807bb7c6f03d6.zip
cpython-179c36e411f0924c0c2cb08f848807bb7c6f03d6.tar.gz
cpython-179c36e411f0924c0c2cb08f848807bb7c6f03d6.tar.bz2
Do nothing when loading the same dict as before.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/idle/StackViewer.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/idle/StackViewer.py b/Tools/idle/StackViewer.py
index 71014d9..7af6378 100644
--- a/Tools/idle/StackViewer.py
+++ b/Tools/idle/StackViewer.py
@@ -199,7 +199,6 @@ class NamespaceViewer:
height = 20*len(dict) # XXX 20 == observed height of Entry widget
self.master = master
self.title = title
- self.dict = dict
self.repr = Repr()
self.repr.maxstring = 60
self.repr.maxother = 60
@@ -219,11 +218,16 @@ class NamespaceViewer:
self.sfid = canvas.create_window(0, 0, window=subframe, anchor="nw")
self.load_dict(dict)
+ dict = -1
+
def load_dict(self, dict):
+ if dict is self.dict:
+ return
subframe = self.subframe
frame = self.frame
for c in subframe.children.values():
c.destroy()
+ self.dict = None
if not dict:
l = Label(subframe, text="None")
l.grid(row=0, column=0)
@@ -242,6 +246,7 @@ class NamespaceViewer:
## l["state"] = "disabled"
l.grid(row=row, column=1, sticky="nw")
row = row+1
+ self.dict = dict
# XXX Could we use a <Configure> callback for the following?
subframe.update_idletasks() # Alas!
width = subframe.winfo_reqwidth()