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.
This commit is contained in:
Garvit Khatri 2018-03-26 12:32:05 +05:30 committed by Serhiy Storchaka
parent 2b75fc2bc9
commit 3ab44c0783
3 changed files with 14 additions and 1 deletions

View file

@ -1361,7 +1361,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: