mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
fix Editor Crashes When Middle Mouse Button Is Clicked on Empty Space in scene_tabs
This commit is contained in:
parent
6a6a1168a5
commit
0785c9ad81
1 changed files with 3 additions and 1 deletions
|
|
@ -208,8 +208,10 @@ void TabBar::gui_input(const Ref<InputEvent> &p_event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (close_with_middle_mouse && mb->is_pressed() && mb->get_button_index() == MouseButton::MIDDLE) {
|
if (close_with_middle_mouse && mb->is_pressed() && mb->get_button_index() == MouseButton::MIDDLE) {
|
||||||
|
if (hover != -1) {
|
||||||
emit_signal(SNAME("tab_close_pressed"), hover);
|
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))) {
|
if (mb->is_pressed() && (mb->get_button_index() == MouseButton::LEFT || (select_with_rmb && mb->get_button_index() == MouseButton::RIGHT))) {
|
||||||
Point2 pos = mb->get_position();
|
Point2 pos = mb->get_position();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue