diff options
author | MinusKube <minuskube@gmail.com> | 2022-09-17 19:07:56 +0200 |
---|---|---|
committer | MinusKube <minuskube@gmail.com> | 2022-09-17 19:07:56 +0200 |
commit | 0ff2020bd44f316a0bd44f53faf46196b39f6b8a (patch) | |
tree | 2f3bc84e93c9cf7bb6369ea4902a3a207bcba567 /editor/plugins/tiles | |
parent | c2babb65580d4dce3a0fc8834dd05fe177227b6e (diff) |
Fix atlas view drawing roots having zoom applied twice
Diffstat (limited to 'editor/plugins/tiles')
-rw-r--r-- | editor/plugins/tiles/tile_atlas_view.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index d9291503cb..c823487279 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -403,6 +403,9 @@ void TileAtlasView::set_atlas_source(TileSet *p_tile_set, TileSetAtlasSource *p_ // Update everything. _update_zoom_and_panning(); + base_tiles_drawing_root->set_size(_compute_base_tiles_control_size()); + alternative_tiles_drawing_root->set_size(_compute_alternative_tiles_control_size()); + // Update. base_tiles_draw->queue_redraw(); base_tiles_texture_grid->queue_redraw(); @@ -601,7 +604,6 @@ TileAtlasView::TileAtlasView() { base_tiles_drawing_root = memnew(Control); base_tiles_drawing_root->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); - base_tiles_drawing_root->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT); base_tiles_drawing_root->set_texture_filter(TEXTURE_FILTER_NEAREST); base_tiles_root_control->add_child(base_tiles_drawing_root); @@ -645,7 +647,6 @@ TileAtlasView::TileAtlasView() { alternative_tiles_drawing_root = memnew(Control); alternative_tiles_drawing_root->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); - alternative_tiles_drawing_root->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT); alternative_tiles_drawing_root->set_texture_filter(TEXTURE_FILTER_NEAREST); alternative_tiles_root_control->add_child(alternative_tiles_drawing_root); |