You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix blurry after zooming
This commit is contained in:
@@ -3341,8 +3341,8 @@ void CanvasItemEditor::_zoom_on_position(float p_zoom, Point2 p_position) {
|
|||||||
zoom = p_zoom;
|
zoom = p_zoom;
|
||||||
Point2 ofs = p_position;
|
Point2 ofs = p_position;
|
||||||
ofs = ofs / prev_zoom - ofs / zoom;
|
ofs = ofs / prev_zoom - ofs / zoom;
|
||||||
h_scroll->set_value(h_scroll->get_value() + ofs.x);
|
h_scroll->set_value(Math::round(h_scroll->get_value() + ofs.x));
|
||||||
v_scroll->set_value(v_scroll->get_value() + ofs.y);
|
v_scroll->set_value(Math::round(v_scroll->get_value() + ofs.y));
|
||||||
|
|
||||||
_update_scroll(0);
|
_update_scroll(0);
|
||||||
viewport->update();
|
viewport->update();
|
||||||
|
|||||||
Reference in New Issue
Block a user