Explorar o código

Merge pull request #2635 from StraToN/tabs-buttons

Fixed bug : both tab buttons appearing hovered
Juan Linietsky %!s(int64=9) %!d(string=hai) anos
pai
achega
75922c57d6
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      scene/gui/tabs.cpp

+ 2 - 0
scene/gui/tabs.cpp

@@ -102,11 +102,13 @@ void Tabs::_input_event(const InputEvent& p_event) {
 			// test hovering right button and close button
 			// test hovering right button and close button
 			if (tabs[i].rb_rect.has_point(pos)) {
 			if (tabs[i].rb_rect.has_point(pos)) {
 				rb_hover=i;
 				rb_hover=i;
+				cb_hover=-1;
 				hover_buttons = i;
 				hover_buttons = i;
 				break;
 				break;
 			}
 			}
 			else if (tabs[i].cb_rect.has_point(pos)) {
 			else if (tabs[i].cb_rect.has_point(pos)) {
 				cb_hover=i;
 				cb_hover=i;
+				rb_hover=-1;
 				hover_buttons = i;
 				hover_buttons = i;
 				break;
 				break;
 			}
 			}