From 6bb87d7d237578bddc99055038525da8deaf61e2 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Tue, 21 Apr 2020 12:45:25 +0200 Subject: [PATCH] Mention how to remove TreeItem from a Tree (cherry picked from commit f6aec99d27d2329740b40d7d0f6e06dad564f6e7) --- doc/classes/Tree.xml | 2 +- doc/classes/TreeItem.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 421d0c7edb7..3b6f0a090bf 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -16,7 +16,7 @@ var subchild1 = tree.create_item(child1) subchild1.set_text(0, "Subchild1") [/codeblock] - To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. + To iterate over all the [TreeItem] objects in a [Tree] object, use [method TreeItem.get_next] and [method TreeItem.get_children] after getting the root through [method get_root]. You can use [method Object.free] on a [TreeItem] to remove it from the [Tree]. diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 7be2fafdba6..f3273e641e2 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -5,6 +5,7 @@ Control for a single item inside a [Tree]. May have child [TreeItem]s and be styled as well as contain buttons. + You can remove a [TreeItem] by using [method Object.free]. @@ -350,7 +351,7 @@ - Removes the given child TreeItem. + Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free].