summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-11-18 18:59:02 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-11-18 18:59:02 -0300
commitb4f88eb4b6dff2b22f333c14d77634bc0cf727ba (patch)
tree400eb85727944e8cb105f7a1b2dff58c75ced969
parentf7389065193646a1903c59fe6b35c37e6b6a4543 (diff)
parent8d48cf95b9408a0a54bb741c6b795d2e5179503d (diff)
Merge pull request #2735 from TheHX/fix_tree_checkbox
Fix Tree checkbox check/uncheck behavior
-rw-r--r--scene/gui/tree.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index a27918cf52..16a12fe407 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2271,9 +2271,12 @@ bool Tree::edit_selected() {
TreeItem::Cell &c = s->cells[col];
+ if (c.mode==TreeItem::CELL_MODE_CHECK) {
-
- if (c.mode==TreeItem::CELL_MODE_CUSTOM) {
+ s->set_checked(col, !c.checked);
+ item_edited(col,s);
+ return true;
+ } else if (c.mode==TreeItem::CELL_MODE_CUSTOM) {
edited_item=s;
edited_col=col;