diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-12-20 22:19:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-20 22:19:16 +0100 |
commit | 0b1e6ec2195a22ad66513685d0c0850eaeb9b528 (patch) | |
tree | 42e807967b468b29314e22a853269ad27e7512a2 | |
parent | feef500b391b492959b2db3a7699ad14c6a37892 (diff) | |
parent | ec139d8522e9623a05d3e63ada4fbb86a6a11d26 (diff) |
Merge pull request #14874 from volzhs/blurry-zoom
Fix blurry after zooming
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index ad22c12372..f5bfea3395 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3341,8 +3341,8 @@ void CanvasItemEditor::_zoom_on_position(float p_zoom, Point2 p_position) { zoom = p_zoom; Point2 ofs = p_position; ofs = ofs / prev_zoom - ofs / zoom; - h_scroll->set_value(h_scroll->get_value() + ofs.x); - v_scroll->set_value(v_scroll->get_value() + ofs.y); + h_scroll->set_value(Math::round(h_scroll->get_value() + ofs.x)); + v_scroll->set_value(Math::round(v_scroll->get_value() + ofs.y)); _update_scroll(0); viewport->update(); |