diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index b802aa9505e..410dcb4524c 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -209,7 +209,6 @@ void Tabs::_input_event(const InputEvent &p_event) { if (found != -1) { set_current_tab(found); - emit_signal("tab_changed", found); } } } @@ -400,12 +399,15 @@ int Tabs::get_tab_count() const { void Tabs::set_current_tab(int p_current) { + if (current == p_current) return; ERR_FAIL_INDEX(p_current, get_tab_count()); current = p_current; _change_notify("current_tab"); update(); + + emit_signal("tab_changed", p_current); } int Tabs::get_current_tab() const {