From dd4f2a2ccb2d32aec0157562095e086b6c6a11be Mon Sep 17 00:00:00 2001 From: Pawel Kowal Date: Mon, 19 Sep 2016 23:07:24 +0200 Subject: [PATCH] Use full width of TreeItem::Cell to change value in CELL_MODE_CHECK --- scene/gui/tree.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 20794b2faa9..2a032180595 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1701,16 +1701,11 @@ int Tree::propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_ } break; case TreeItem::CELL_MODE_CHECK: { - Ref checked = cache.checked; bring_up_editor=false; //checkboxes are not edited with editor - if (x>=0 && x<= checked->get_width()+cache.hseparation ) { - - - p_item->set_checked(col,!c.checked); - item_edited(col,p_item); - click_handled=true; - //p_item->edited_signal.call(col); - } + p_item->set_checked(col, !c.checked); + item_edited(col, p_item); + click_handled = true; + //p_item->edited_signal.call(col); } break; case TreeItem::CELL_MODE_RANGE: