diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-09-13 21:07:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 21:07:08 +0200 |
commit | feba85a569c1d3c2411f721e11d081e6abf9c8de (patch) | |
tree | ed9c131d9c0f5372e740f94f6231411e9cf69eb8 | |
parent | 32d93feebe473f5a2f63da3a4f39e81f10054ce9 (diff) | |
parent | c03e7c2dde10c0981ae9db39e4e6a7a40838b3db (diff) |
Merge pull request #52554 from Calinou/2d-editor-enable-pixel-snap
Enable Pixel Snap by default in the 2D editor
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index d96cc1cd18..f11e51960c 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -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; |