From b8145c182bc1ac5e2cf7d84aad587a8ada11fe7a Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Sat, 14 Nov 2020 15:18:01 +0100 Subject: [PATCH] Correct the doc about Tree.get_edited --- doc/classes/Tree.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 0b2fb804802..73575b43096 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -106,14 +106,21 @@ - Returns the currently edited item. This is only available for custom cell mode. + Returns the currently edited item. Can be used with [signal item_edited] to get the item that was modified. + [codeblock] + func _ready(): + $Tree.item_edited.connect(on_Tree_item_edited) + + func on_Tree_item_edited(): + print($Tree.get_edited()) # This item just got edited (e.g. checked). + [/codeblock] - Returns the column for the currently edited item. This is only available for custom cell mode. + Returns the column for the currently edited item.