summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2020-11-14 15:18:01 +0100
committerTomasz Chabora <kobewi4e@gmail.com>2020-11-14 16:35:53 +0100
commitb8145c182bc1ac5e2cf7d84aad587a8ada11fe7a (patch)
tree78b86b46125fefc029eb7bcb035635f8c953bf8b /doc/classes
parentdd5485142f2d2d84b98483ea41bc36e03c4a16b7 (diff)
Correct the doc about Tree.get_edited
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/Tree.xml11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index 0b2fb80480..73575b4309 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -106,14 +106,21 @@
<return type="TreeItem">
</return>
<description>
- 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]
</description>
</method>
<method name="get_edited_column" qualifiers="const">
<return type="int">
</return>
<description>
- Returns the column for the currently edited item. This is only available for custom cell mode.
+ Returns the column for the currently edited item.
</description>
</method>
<method name="get_item_area_rect" qualifiers="const">