summaryrefslogtreecommitdiff
path: root/Lib/tkinter/ttk.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-03-26 01:20:10 -0700
committerGitHub <noreply@github.com>2018-03-26 01:20:10 -0700
commit45116d393f713bbe918f16b33a0bba28b15bc96b (patch)
tree403245dcfb0dd758b6a9a07349c04f7b69cd726f /Lib/tkinter/ttk.py
parentf5befbb0d1526f18eb2b24eabb48c3b761c624a2 (diff)
downloadcpython-git-45116d393f713bbe918f16b33a0bba28b15bc96b.tar.gz
bpo-33096: Fix ttk.Treeview.insert. (GH-6228)
Allow ttk.Treeview.insert to insert iid that has a false boolean value. Note iid=0 and iid=False would be same. (cherry picked from commit 3ab44c0783eebdff687014f7d14d5dec59b6bd39) Co-authored-by: Garvit Khatri <garvitdelhi@gmail.com>
Diffstat (limited to 'Lib/tkinter/ttk.py')
-rw-r--r--Lib/tkinter/ttk.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py
index 42e29bd3e5..3cf5faf10d 100644
--- a/Lib/tkinter/ttk.py
+++ b/Lib/tkinter/ttk.py
@@ -1336,7 +1336,7 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
already exist in the tree. Otherwise, a new unique identifier
is generated."""
opts = _format_optdict(kw)
- if iid:
+ if iid is not None:
res = self.tk.call(self._w, "insert", parent, index,
"-id", iid, *opts)
else: