diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-09-10 12:02:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 12:02:19 +0200 |
commit | 49283cb80dc047ed7e034d1fa89f72d88207fddb (patch) | |
tree | 27809e7dc0c27cc5189fcd22cf821af484f4b612 | |
parent | 1d709120804240efbbee7f0bcec81c8ba3554e03 (diff) | |
parent | 3f5413693cee821b80f867177bd47ddade5755a9 (diff) |
Merge pull request #41795 from Hassan-A/tilemap-rotate-fix
Fix tilemap tile preview on horizontal/vertical flips.
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index e71485e9fc..8cd8aaf277 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -802,7 +802,6 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p r.size = node->get_tileset()->autotile_get_size(p_cell); r.position += (r.size + Vector2(spacing, spacing)) * offset; } - Size2 sc = p_xform.get_scale(); Size2 cell_size = node->get_cell_size(); bool centered_texture = node->is_centered_textures_enabled(); bool compatibility_mode_enabled = node->is_compatibility_mode_enabled(); @@ -838,12 +837,12 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p } if (p_flip_h) { - sc.x *= -1.0; + rect.size.x *= -1.0; tile_ofs.x *= -1.0; } if (p_flip_v) { - sc.y *= -1.0; + rect.size.y *= -1.0; tile_ofs.y *= -1.0; } |