From 4276752608a3209f1dc91f4265e31809d3923017 Mon Sep 17 00:00:00 2001 From: kleonc <9283098+kleonc@users.noreply.github.com> Date: Thu, 5 Jan 2023 21:54:00 +0100 Subject: TileAtlasView Update zoom and panning before emitting signal --- editor/plugins/tiles/tile_atlas_view.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index 5b7da148d8..3c6ed0f049 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -53,14 +53,14 @@ void TileAtlasView::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) { void TileAtlasView::_pan_callback(Vector2 p_scroll_vec) { panning += p_scroll_vec; - emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning); _update_zoom_and_panning(true); + emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning); } void TileAtlasView::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) { zoom_widget->set_zoom_by_increments(-p_scroll_vec.y * 2); - emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning); _update_zoom_and_panning(true); + emit_signal(SNAME("transform_changed"), zoom_widget->get_zoom(), panning); } Size2i TileAtlasView::_compute_base_tiles_control_size() { -- cgit v1.2.3