summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-07-23 02:52:58 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-07-23 02:52:58 (GMT)
commit58b63bf4e3e8ef082126c3687edd2cf75226303d (patch)
tree0f83a1787906c67d8e4d232a004e8f7fda7d9483 /Lib/lib-tk
parentef5d06bd3f652e7680497bc2d398aa8038cceace (diff)
downloadcpython-58b63bf4e3e8ef082126c3687edd2cf75226303d.zip
cpython-58b63bf4e3e8ef082126c3687edd2cf75226303d.tar.gz
cpython-58b63bf4e3e8ef082126c3687edd2cf75226303d.tar.bz2
SF patch #581396, Canvas "select_item" always returns None
Return the selected item, if there is any.
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/Tkinter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index c5bf136..573d71d 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -2103,7 +2103,7 @@ class Canvas(Widget):
self.tk.call(self._w, 'select', 'from', tagOrId, index)
def select_item(self):
"""Return the item which has the selection."""
- self.tk.call(self._w, 'select', 'item')
+ return self.tk.call(self._w, 'select', 'item') or None
def select_to(self, tagOrId, index):
"""Set the variable end of a selection in item TAGORID to INDEX."""
self.tk.call(self._w, 'select', 'to', tagOrId, index)