1
0
Fork 0

[3.x] Fix CanvasItemEditor scale editor not using the editor methods

This commit is contained in:
Aaron Franke 2022-02-10 04:02:02 -06:00
parent 7244ea7e20
commit a672f0db17
No known key found for this signature in database
GPG Key ID: 40A1750B977E56BF
1 changed files with 2 additions and 2 deletions

View File

@ -2083,7 +2083,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
Point2 drag_to_local = simple_xform.xform(drag_to);
Point2 offset = drag_to_local - drag_from_local;
Size2 scale = canvas_item->call("get_scale");
Size2 scale = canvas_item->_edit_get_scale();
float ratio = scale.y / scale.x;
if (drag_type == DRAG_SCALE_BOTH) {
Size2 scale_factor = drag_to_local / drag_from_local;
@ -2114,7 +2114,7 @@ bool CanvasItemEditor::_gui_input_scale(const Ref<InputEvent> &p_event) {
scale.y = roundf(scale.y / snap_scale_step) * snap_scale_step;
}
canvas_item->call("set_scale", scale);
canvas_item->_edit_set_scale(scale);
return true;
}