summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-30 17:51:45 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-30 17:52:32 -0300
commit89bb72b2d3ae209eae64252fcbac7d6f0ff6e376 (patch)
tree8fe3c97ad888cc57d7961f3e12ca0cf57d49107b /scene/gui
parent729e61e1d5faedeee116f3e3189c5453e206643e (diff)
Only emit item_selected once per Tree row, closes #5280
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/tree.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index f8516f8f5d..db14c15db8 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1355,6 +1355,8 @@ void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col
switched=true;
}
+ bool emitted_row=false;
+
for (int i=0;i<columns.size();i++) {
TreeItem::Cell &c=p_current->cells[i];
@@ -1373,7 +1375,10 @@ void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col
selected_item=p_selected;
selected_col=0;
selected_item=p_selected;
- emit_signal("item_selected");
+ if (!emitted_row) {
+ emit_signal("item_selected");
+ emitted_row=true;
+ }
//if (p_col==i)
// p_current->selected_signal.call(p_col);
}