mirror of
https://github.com/godotengine/godot.git
synced 2025-10-21 08:53:35 +00:00
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
parent
03b13e0c69
commit
e956e80c1f
130 changed files with 967 additions and 511 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue