summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-06 00:13:16 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-06 00:13:16 +0100
commit272b82bdaedb6d0b833d96830173a7aae2a657a3 (patch)
treea4643ff401bea41bd97f43865b2fff182e9b0f07 /editor/plugins
parente070362bd0e8213d121fb9be5c11f1b58c7562e4 (diff)
parent4276752608a3209f1dc91f4265e31809d3923017 (diff)
Merge pull request #70968 from kleonc/tile-atlas-view-update-zoom-and-panning
`TileAtlasView` Update zoom and panning before emitting signal
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/tiles/tile_atlas_view.cpp4
1 files 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() {