summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-09-07 11:22:07 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-09-07 11:22:07 -0300
commit1eeda0f32f66b48c8df3b93f333bf702b149ba31 (patch)
treeb274e9ebd9ee64edc0a412ab48d3a2ff98b54f49 /editor/plugins/canvas_item_editor_plugin.cpp
parent895140389a7306eafc9a36f51d892ece0001f223 (diff)
Restored auto snapping of controls to pixels, fixes #10847 and probably several more issues. Made it optional in the project settings but defaults to true.
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index df4598793c..3d5732c749 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2269,6 +2269,9 @@ void CanvasItemEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_FIXED_PROCESS) {
+
+ EditorNode::get_singleton()->get_scene_root()->set_snap_controls_to_pixels(GLOBAL_GET("gui/common/snap_controls_to_pixels"));
+
List<Node *> &selection = editor_selection->get_selected_node_list();
bool all_control = true;