diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index ab41a3a8c5a..bb0b1ad0307 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1282,6 +1282,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;icells[i]; @@ -1300,7 +1302,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); }