diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 15:32:01 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-19 15:32:01 +0200 |
commit | aa42b4f0cb448deb200cec67a11d272d3caf46f5 (patch) | |
tree | 6784de9f101ac1828aff8f22cebe71480d06a6d2 /editor/plugins/tiles | |
parent | 1be4f4b69f1dfe7ca5194315b97a879173e98053 (diff) | |
parent | 0ff2020bd44f316a0bd44f53faf46196b39f6b8a (diff) |
Merge pull request #65995 from MinusKube/tileset-size-bug
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); |