From 96edb55fcd3a0f25bb786a9ae96f2cffca934730 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Thu, 12 Mar 2026 17:38:10 -0300 Subject: [PATCH] Fix mouse wheel zoom scrolling contents in the `GridMap` editor --- modules/gridmap/editor/grid_map_editor_plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index cf2639d3c6..6f7944d844 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -1055,16 +1055,18 @@ void GridMapEditor::_text_changed(const String &p_text) { void GridMapEditor::_mesh_library_palette_input(const Ref &p_ie) { const Ref mb = p_ie; - // Zoom in/out using Ctrl + mouse wheel + // Zoom in/out using Ctrl + mouse wheel. if (mb.is_valid() && mb->is_pressed() && mb->is_command_or_control_pressed()) { if (mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_UP) { zoom_widget->set_zoom(zoom_widget->get_zoom() + 0.2); zoom_widget->emit_signal(SNAME("zoom_changed"), zoom_widget->get_zoom()); + accept_event(); } if (mb->is_pressed() && mb->get_button_index() == MouseButton::WHEEL_DOWN) { zoom_widget->set_zoom(zoom_widget->get_zoom() - 0.2); zoom_widget->emit_signal(SNAME("zoom_changed"), zoom_widget->get_zoom()); + accept_event(); } } }