diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /editor/plugins/camera_3d_editor_plugin.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'editor/plugins/camera_3d_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/camera_3d_editor_plugin.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/editor/plugins/camera_3d_editor_plugin.cpp b/editor/plugins/camera_3d_editor_plugin.cpp index 8bc1374269..58ea5e45bb 100644 --- a/editor/plugins/camera_3d_editor_plugin.cpp +++ b/editor/plugins/camera_3d_editor_plugin.cpp @@ -33,7 +33,6 @@ #include "node_3d_editor_plugin.h" void Camera3DEditor::_node_removed(Node *p_node) { - if (p_node == node) { node = nullptr; Node3DEditor::get_singleton()->set_custom_camera(nullptr); @@ -42,7 +41,6 @@ void Camera3DEditor::_node_removed(Node *p_node) { } void Camera3DEditor::_pressed() { - Node *sn = (node && preview->is_pressed()) ? node : nullptr; Node3DEditor::get_singleton()->set_custom_camera(sn); } @@ -51,14 +49,12 @@ void Camera3DEditor::_bind_methods() { } void Camera3DEditor::edit(Node *p_camera) { - node = p_camera; if (!node) { preview->set_pressed(false); Node3DEditor::get_singleton()->set_custom_camera(nullptr); } else { - if (preview->is_pressed()) Node3DEditor::get_singleton()->set_custom_camera(p_camera); else @@ -67,7 +63,6 @@ void Camera3DEditor::edit(Node *p_camera) { } Camera3DEditor::Camera3DEditor() { - preview = memnew(Button); add_child(preview); @@ -83,18 +78,15 @@ Camera3DEditor::Camera3DEditor() { } void Camera3DEditorPlugin::edit(Object *p_object) { - Node3DEditor::get_singleton()->set_can_preview(Object::cast_to<Camera3D>(p_object)); //camera_editor->edit(Object::cast_to<Node>(p_object)); } bool Camera3DEditorPlugin::handles(Object *p_object) const { - return p_object->is_class("Camera3D"); } void Camera3DEditorPlugin::make_visible(bool p_visible) { - if (p_visible) { //Node3DEditor::get_singleton()->set_can_preview(Object::cast_to<Camera3D>(p_object)); } else { @@ -103,7 +95,6 @@ void Camera3DEditorPlugin::make_visible(bool p_visible) { } Camera3DEditorPlugin::Camera3DEditorPlugin(EditorNode *p_node) { - editor = p_node; /* camera_editor = memnew( CameraEditor ); editor->get_viewport()->add_child(camera_editor); |