'tab_changed' signal after using 'set_current_tab'
closes #10051
(cherry picked from commit 63ddad98f5
)
This commit is contained in:
parent
2b2c0523b5
commit
9e57957f78
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue