Merge pull request #53551 from YeldhamDev/tabs_is_a_buggy_mess
Fix invisible tabs not being ignored in `Tabs`
This commit is contained in:
commit
9b34442d93
|
@ -223,7 +223,7 @@ void Tabs::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int found = -1;
|
int found = -1;
|
||||||
for (int i = offset; i < tabs.size(); i++) {
|
for (int i = offset; i <= max_drawn_tab; i++) {
|
||||||
if (tabs[i].rb_rect.has_point(pos)) {
|
if (tabs[i].rb_rect.has_point(pos)) {
|
||||||
rb_pressing = true;
|
rb_pressing = true;
|
||||||
update();
|
update();
|
||||||
|
@ -914,7 +914,7 @@ void Tabs::drop_data(const Point2 &p_point, const Variant &p_data) {
|
||||||
|
|
||||||
int Tabs::get_tab_idx_at_point(const Point2 &p_point) const {
|
int Tabs::get_tab_idx_at_point(const Point2 &p_point) const {
|
||||||
int hover_now = -1;
|
int hover_now = -1;
|
||||||
for (int i = offset; i < tabs.size(); i++) {
|
for (int i = offset; i <= max_drawn_tab; i++) {
|
||||||
Rect2 rect = get_tab_rect(i);
|
Rect2 rect = get_tab_rect(i);
|
||||||
if (rect.has_point(p_point)) {
|
if (rect.has_point(p_point)) {
|
||||||
hover_now = i;
|
hover_now = i;
|
||||||
|
|
Loading…
Reference in a new issue