summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-10 15:38:53 +0200
committerGitHub <noreply@github.com>2020-05-10 15:38:53 +0200
commit6ab92464bc6356f3342c3efd1fc1bb1a5e4467d5 (patch)
tree405a85e89e036e2240c74ee850121d912e21704b /editor/plugins/canvas_item_editor_plugin.cpp
parent54b20a25b90c8c8d8dfd7f68d66d0ec57c71435f (diff)
parent69de7ce38c40c57a1fabe12c9e5a3eab903a4035 (diff)
Merge pull request #38621 from akien-mga/stylé-comme-jamais
Style: clang-format: Disable if statements and case labels on single line
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index e882b3a8d7..65c0763e63 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -1624,20 +1624,28 @@ bool CanvasItemEditor::_gui_input_anchors(const Ref<InputEvent> &p_event) {
switch (drag_type) {
case DRAG_ANCHOR_TOP_LEFT:
- if (!use_single_axis || !use_y) control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
- if (!use_single_axis || use_y) control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
+ if (!use_single_axis || !use_y)
+ control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
+ if (!use_single_axis || use_y)
+ control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
break;
case DRAG_ANCHOR_TOP_RIGHT:
- if (!use_single_axis || !use_y) control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
- if (!use_single_axis || use_y) control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
+ if (!use_single_axis || !use_y)
+ control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
+ if (!use_single_axis || use_y)
+ control->set_anchor(MARGIN_TOP, new_anchor.y, false, false);
break;
case DRAG_ANCHOR_BOTTOM_RIGHT:
- if (!use_single_axis || !use_y) control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
- if (!use_single_axis || use_y) control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
+ if (!use_single_axis || !use_y)
+ control->set_anchor(MARGIN_RIGHT, new_anchor.x, false, false);
+ if (!use_single_axis || use_y)
+ control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
break;
case DRAG_ANCHOR_BOTTOM_LEFT:
- if (!use_single_axis || !use_y) control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
- if (!use_single_axis || use_y) control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
+ if (!use_single_axis || !use_y)
+ control->set_anchor(MARGIN_LEFT, new_anchor.x, false, false);
+ if (!use_single_axis || use_y)
+ control->set_anchor(MARGIN_BOTTOM, new_anchor.y, false, false);
break;
case DRAG_ANCHOR_ALL:
if (!use_single_axis || !use_y) {
@@ -5037,7 +5045,8 @@ void CanvasItemEditor::_focus_selection(int p_op) {
Map<Node *, Object *> &selection = editor_selection->get_selection();
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
- if (!canvas_item) continue;
+ if (!canvas_item)
+ continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
@@ -5065,7 +5074,8 @@ void CanvasItemEditor::_focus_selection(int p_op) {
rect = rect.merge(canvas_item_rect);
}
};
- if (count == 0) return;
+ if (count == 0)
+ return;
if (p_op == VIEW_CENTER_TO_SELECTION) {
@@ -6252,7 +6262,8 @@ void CanvasItemEditorViewport::_notification(int p_what) {
disconnect("mouse_exited", callable_mp(this, &CanvasItemEditorViewport::_on_mouse_exit));
} break;
- default: break;
+ default:
+ break;
}
}