summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/ttk.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-14 09:39:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-14 09:39:18 (GMT)
commit255bbf2d2501974f25d9da201c3119cbca863f5a (patch)
tree5f0db36a93c3900e17d2e78c498a33f6ed618c21 /Lib/tkinter/ttk.py
parent6d1d2f229e02cd2b45bdd46f5fdcc5b89dd682bd (diff)
parent8e6d09c1ccb5fed0d1b074aae9325f41fed4705d (diff)
downloadcpython-255bbf2d2501974f25d9da201c3119cbca863f5a.zip
cpython-255bbf2d2501974f25d9da201c3119cbca863f5a.tar.gz
cpython-255bbf2d2501974f25d9da201c3119cbca863f5a.tar.bz2
Issue #26386: Fixed ttk.TreeView selection operations with item id's
containing spaces.
Diffstat (limited to 'Lib/tkinter/ttk.py')
-rw-r--r--Lib/tkinter/ttk.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py
index 8f217bf..7b71e77 100644
--- a/Lib/tkinter/ttk.py
+++ b/Lib/tkinter/ttk.py
@@ -1396,7 +1396,9 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
def selection(self, selop=None, items=None):
"""If selop is not specified, returns selected items."""
- return self.tk.call(self._w, "selection", selop, items)
+ if isinstance(items, (str, bytes)):
+ items = (items,)
+ return self.tk.splitlist(self.tk.call(self._w, "selection", selop, items))
def selection_set(self, items):