Skip to content

Commit 8fe5502

Browse files
committed
Merge pull request #106001 from kitbdev/dont-force-control-rect-pixel-snap
Allow Control Rect tool to not snap to pixel
2 parents acf38b2 + e6cb7af commit 8fe5502

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scene/gui/control.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ Size2 Control::_edit_get_scale() const {
130130

131131
void Control::_edit_set_rect(const Rect2 &p_edit_rect) {
132132
ERR_FAIL_COND_MSG(!Engine::get_singleton()->is_editor_hint(), "This function can only be used from editor plugins.");
133-
set_position((get_position() + get_transform().basis_xform(p_edit_rect.position)).snappedf(1), ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
134-
set_size(p_edit_rect.size.snappedf(1), ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
133+
set_position((get_position() + get_transform().basis_xform(p_edit_rect.position)), ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
134+
set_size(p_edit_rect.size, ControlEditorToolbar::get_singleton()->is_anchors_mode_enabled());
135135
}
136136

137137
void Control::_edit_set_rotation(real_t p_rotation) {

0 commit comments

Comments
 (0)