mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
fix Editor Crashes When Middle Mouse Button Is Clicked on Empty Space in scene_tabs
This commit is contained in:
@@ -208,7 +208,9 @@ void TabBar::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
|
||||
if (close_with_middle_mouse && mb->is_pressed() && mb->get_button_index() == MouseButton::MIDDLE) {
|
||||
emit_signal(SNAME("tab_close_pressed"), hover);
|
||||
if (hover != -1) {
|
||||
emit_signal(SNAME("tab_close_pressed"), hover);
|
||||
}
|
||||
}
|
||||
|
||||
if (mb->is_pressed() && (mb->get_button_index() == MouseButton::LEFT || (select_with_rmb && mb->get_button_index() == MouseButton::RIGHT))) {
|
||||
|
||||
Reference in New Issue
Block a user