diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-11-13 22:18:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 22:18:56 +0100 |
commit | 4755bc9e2b45d0ed79a54e847e175c4692fabb39 (patch) | |
tree | a05042c1fd6bafc50a0dc466858e9577c2002adf | |
parent | 05a780a10106f04ebc5bfed86b792ba4867cb44e (diff) | |
parent | 89f7032c2e944255955b5eabf0b2df4c2190748d (diff) |
Merge pull request #12854 from poke1024/fix-poly2d-editor-handle
Fix minor drawing order glitch in polygon 2D editor
-rw-r--r-- | editor/plugins/abstract_polygon_2d_editor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index f2f913d2b3..736e176ab8 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -563,6 +563,14 @@ void AbstractPolygon2DEditor::forward_draw_over_canvas(Control *p_canvas) { const Vector2 next_point = xform.xform(p2); vpc->draw_line(point, next_point, col, 2); } + } + + for (int i = 0; i < n_points; i++) { + + const Vertex vertex(j, i); + + const Vector2 p = (vertex == edited_point) ? edited_point.pos : (points[i] + offset); + const Vector2 point = xform.xform(p); Ref<Texture> handle = vertex == active_point ? selected_handle : default_handle; vpc->draw_texture(handle, point - handle->get_size() * 0.5); |