]> granicus.if.org Git - python/commitdiff
PhotoImage.put(): Fixed -to handling, including backward compatibility hack.
authorFred Drake <fdrake@acm.org>
Tue, 16 Dec 1997 15:03:43 +0000 (15:03 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 16 Dec 1997 15:03:43 +0000 (15:03 +0000)
Guido, please take a look at this.

Lib/lib-tk/Tkinter.py

index 61cb07eb7aad04578a4075a3f61a333913f536c1..763ab0b78a20d578dc3e98100c6bba9cf7230e1a 100644 (file)
@@ -1770,7 +1770,9 @@ class PhotoImage(Image):
        def put(self, data, to=None):
                args = (self.name, 'put', data)
                if to:
-                       args = args + to
+                       if to[0] == '-to':
+                               to = to[1:]
+                       args = args + ('-to',) + tuple(to)
                apply(self.tk.call, args)
        # XXX read
        def write(self, filename, format=None, from_coords=None):