Merge pull request #52554 from Calinou/2d-editor-enable-pixel-snap

Enable Pixel Snap by default in the 2D editor
This commit is contained in:
Rémi Verschelde 2021-09-13 21:07:08 +02:00 committed by GitHub
commit feba85a569
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5204,7 +5204,9 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_rotation = false;
snap_scale = false;
snap_relative = false;
snap_pixel = false;
// Enable pixel snapping even if pixel snap rendering is disabled in the Project Settings.
// This results in crisper visuals by preventing 2D nodes from being placed at subpixel coordinates.
snap_pixel = true;
snap_target[0] = SNAP_TARGET_NONE;
snap_target[1] = SNAP_TARGET_NONE;