diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-08 23:12:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 23:12:05 +0100 |
commit | 8907c566ed24b5c648c5b733b85e004299a51c27 (patch) | |
tree | 00c53722b9eda9e6acc0c377938d0c6be44b06a7 | |
parent | c65a4fe9b6d45357ed938744758b8e965746f0db (diff) | |
parent | 2d82e076f49db6b4979da5e75926e1c0fa8c5636 (diff) |
Merge pull request #57773 from pfertyk/issue_57710_tabbar_update_hover
-rw-r--r-- | scene/gui/tab_bar.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/tab_bar.cpp b/scene/gui/tab_bar.cpp index 5a551ec5a5..b1baacd887 100644 --- a/scene/gui/tab_bar.cpp +++ b/scene/gui/tab_bar.cpp @@ -761,6 +761,8 @@ void TabBar::_update_hover() { return; } + ERR_FAIL_COND(tabs.is_empty()); + const Point2 &pos = get_local_mouse_position(); // Test hovering to display right or close button. int hover_now = -1; @@ -1436,7 +1438,6 @@ void TabBar::_get_property_list(List<PropertyInfo> *p_list) const { } void TabBar::_bind_methods() { - ClassDB::bind_method(D_METHOD("_update_hover"), &TabBar::_update_hover); ClassDB::bind_method(D_METHOD("set_tab_count", "count"), &TabBar::set_tab_count); ClassDB::bind_method(D_METHOD("get_tab_count"), &TabBar::get_tab_count); ClassDB::bind_method(D_METHOD("set_current_tab", "tab_idx"), &TabBar::set_current_tab); |