summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorFranklin Sobrinho <franklin_gs@hotmail.com>2015-11-05 12:20:45 -0300
committerFranklin Sobrinho <franklin_gs@hotmail.com>2015-11-05 12:20:45 -0300
commit8d48cf95b9408a0a54bb741c6b795d2e5179503d (patch)
treef44a5d7e70ce8b6c848ff6120919512b79a7bc68 /scene/gui
parentdde6396f221672d34d178c75f4080c1e87612aea (diff)
Add Tree checkbox check/uncheck behavior when pressing enter
Diffstat (limited to 'scene/gui')
-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 5df6f2ced9..9789c83806 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2266,9 +2266,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;