diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-29 11:05:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 11:05:44 +0100 |
commit | edccc0bbdffe3175e41358e4d85bcd50b6f04d8e (patch) | |
tree | a31a5e9cea58b3d540f0bcb23a369b53fa2eaade /editor/plugins | |
parent | 859873c908752e5232970357ce4fc8a4745a98b1 (diff) | |
parent | 849a8b5f5847feec931fc985fa3f73927b883091 (diff) |
Merge pull request #44759 from Huberion/master
Fix Scrollbar range calculation error
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/polygon_2d_editor_plugin.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 0584ee894b..3315068674 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -1052,8 +1052,6 @@ void Polygon2DEditor::_uv_draw() { if (i < uv_draw_max /*&& polygons.size() == 0 && polygon_create.size() == 0*/) { //if using or creating polygons, do not show outline (will show polygons instead) uv_edit_draw->draw_line(mtx.xform(uvs[i]), mtx.xform(next_point), poly_line_color, Math::round(EDSCALE)); } - - rect.expand_to(mtx.basis_xform(uvs[i])); } for (int i = 0; i < polygons.size(); i++) { @@ -1160,8 +1158,8 @@ void Polygon2DEditor::_uv_draw() { uv_edit_draw->draw_circle(bone_paint_pos, bone_paint_radius->get_value() * EDSCALE, Color(1, 1, 1, 0.1)); } - rect.position -= uv_edit_draw->get_size(); - rect.size += uv_edit_draw->get_size() * 2.0; + rect.position = -uv_edit_draw->get_size(); + rect.size = uv_edit_draw->get_size() * 2.0 + base_tex->get_size() * uv_draw_zoom; updating_uv_scroll = true; |