Skip to content

Commit 6c550c1

Browse files
committed
Format code
1 parent 425ecf0 commit 6c550c1

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

editor/inspector/editor_inspector.cpp

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
#include "editor_inspector.compat.inc"
3333

3434
#include "core/os/keyboard.h"
35-
#include "editor/editor_interface.h"
3635
#include "editor/debugger/editor_debugger_inspector.h"
3736
#include "editor/doc/doc_tools.h"
3837
#include "editor/docks/inspector_dock.h"
38+
#include "editor/editor_interface.h"
3939
#include "editor/editor_main_screen.h"
4040
#include "editor/editor_node.h"
4141
#include "editor/editor_string_names.h"
@@ -1758,8 +1758,8 @@ Size2 EditorInspectorCategory::get_minimum_size() const {
17581758
return ms;
17591759
}
17601760

1761-
void EditorInspectorCategory::_collect_properties(Vector<EditorProperty*>& out_properties) {
1762-
VBoxContainer* targetVbox = nullptr;
1761+
void EditorInspectorCategory::_collect_properties(Vector<EditorProperty *> &out_properties) {
1762+
VBoxContainer *targetVbox = nullptr;
17631763

17641764
if (get_parent()->get_child(get_index() + 1)->get_child_count() == 1) {
17651765
targetVbox = cast_to<VBoxContainer>(get_parent()->get_child(get_index() + 1)->get_child(0));
@@ -1772,13 +1772,13 @@ void EditorInspectorCategory::_collect_properties(Vector<EditorProperty*>& out_p
17721772
}
17731773

17741774
for (int i = 0; i < targetVbox->get_child_count(); i++) {
1775-
Node* child = targetVbox->get_child(i);
1775+
Node *child = targetVbox->get_child(i);
17761776

1777-
if (EditorProperty* prop = Object::cast_to<EditorProperty>(child)) {
1777+
if (EditorProperty *prop = Object::cast_to<EditorProperty>(child)) {
17781778
out_properties.push_back(prop);
1779-
} else if (EditorInspectorSection* nested = Object::cast_to<EditorInspectorSection>(child)) {
1779+
} else if (EditorInspectorSection *nested = Object::cast_to<EditorInspectorSection>(child)) {
17801780
nested->collect_properties(nested, out_properties);
1781-
} else if (EditorInspectorSection* nested = Object::cast_to<EditorInspectorSection>(child->get_child(0))) {
1781+
} else if (EditorInspectorSection *nested = Object::cast_to<EditorInspectorSection>(child->get_child(0))) {
17821782
nested->collect_properties(nested, out_properties);
17831783
}
17841784
}
@@ -1787,21 +1787,21 @@ void EditorInspectorCategory::_collect_properties(Vector<EditorProperty*>& out_p
17871787
void EditorInspectorCategory::_handle_menu_option(int p_option) {
17881788
switch (p_option) {
17891789
case MENU_COPY_VALUE: {
1790-
Object* object = EditorInterface::get_singleton()->get_inspector()->get_edited_object();
1790+
Object *object = EditorInterface::get_singleton()->get_inspector()->get_edited_object();
17911791
Dictionary clipboard;
1792-
Vector<EditorProperty*> properties;
1792+
Vector<EditorProperty *> properties;
17931793
_collect_properties(properties);
17941794

17951795
clipboard["category_name"] = label;
1796-
for (EditorProperty* prop : properties) {
1796+
for (EditorProperty *prop : properties) {
17971797
String property_name = prop->get_edited_property();
17981798
clipboard[property_name] = object->get(property_name);
17991799
}
18001800
InspectorDock::get_inspector_singleton()->set_property_clipboard(clipboard);
18011801
} break;
18021802

18031803
case MENU_PASTE_VALUE: {
1804-
Object* object = EditorInterface::get_singleton()->get_inspector()->get_edited_object();
1804+
Object *object = EditorInterface::get_singleton()->get_inspector()->get_edited_object();
18051805
Dictionary clipboard = InspectorDock::get_inspector_singleton()->get_property_clipboard();
18061806
String category_name = clipboard["category_name"];
18071807
String action_name = "Set category " + category_name;
@@ -2374,8 +2374,7 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
23742374
menu->set_position(get_screen_position() + get_local_mouse_position());
23752375
menu->reset_size();
23762376
menu->popup();
2377-
}
2378-
else if (mb.is_valid() && !mb->is_pressed()) {
2377+
} else if (mb.is_valid() && !mb->is_pressed()) {
23792378
queue_redraw();
23802379
}
23812380
}
@@ -2531,19 +2530,19 @@ void EditorInspectorSection::_update_popup() {
25312530
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionPaste")), ED_GET_SHORTCUT("property_editor/paste_group_values"), MENU_PASTE_VALUE);
25322531
}
25332532

2534-
void EditorInspectorSection::collect_properties(EditorInspectorSection* target_section, Vector<EditorProperty*>& out_properties) {
2535-
VBoxContainer* targetVbox = target_section->get_vbox();
2533+
void EditorInspectorSection::collect_properties(EditorInspectorSection *target_section, Vector<EditorProperty *> &out_properties) {
2534+
VBoxContainer *targetVbox = target_section->get_vbox();
25362535
if (!targetVbox) {
25372536
return;
25382537
}
25392538

25402539
for (int i = 0; i < targetVbox->get_child_count(); i++) {
2541-
Node* child = targetVbox->get_child(i);
2540+
Node *child = targetVbox->get_child(i);
25422541

2543-
if (EditorProperty* prop = Object::cast_to<EditorProperty>(child)) {
2542+
if (EditorProperty *prop = Object::cast_to<EditorProperty>(child)) {
25442543
out_properties.push_back(prop);
25452544
} else if (Object::cast_to<VBoxContainer>(child) && child->get_child_count() > 0) {
2546-
if (EditorInspectorSection* nested = Object::cast_to<EditorInspectorSection>(child->get_child(0))) {
2545+
if (EditorInspectorSection *nested = Object::cast_to<EditorInspectorSection>(child->get_child(0))) {
25472546
// Recursively collect from nested sections
25482547
collect_properties(nested, out_properties);
25492548
}
@@ -2554,12 +2553,12 @@ void EditorInspectorSection::collect_properties(EditorInspectorSection* target_s
25542553
void EditorInspectorSection::menu_option(int p_option) {
25552554
switch (p_option) {
25562555
case MENU_COPY_VALUE: {
2557-
Vector<EditorProperty*> properties;
2556+
Vector<EditorProperty *> properties;
25582557
Dictionary clipboard;
25592558
collect_properties(this, properties);
25602559

25612560
clipboard["group_name"] = section;
2562-
for (EditorProperty* prop : properties) {
2561+
for (EditorProperty *prop : properties) {
25632562
String property_name = prop->get_edited_property();
25642563
clipboard[property_name] = object->get(property_name);
25652564
}

editor/inspector/editor_inspector.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ class EditorInspectorCategory : public Control {
352352
bool is_favorite = false;
353353
bool menu_icon_dirty = true;
354354

355-
void _collect_properties(Vector<EditorProperty*>& out_properties);
355+
void _collect_properties(Vector<EditorProperty *> &out_properties);
356356
void _handle_menu_option(int p_option);
357357
void _popup_context_menu(const Point2i &p_position);
358358
void _update_icon();
@@ -487,7 +487,7 @@ class EditorInspectorSection : public Container {
487487
void update_property();
488488

489489
void _update_popup();
490-
void collect_properties(EditorInspectorSection* target_section, Vector<EditorProperty*>& out_properties);
490+
void collect_properties(EditorInspectorSection *target_section, Vector<EditorProperty *> &out_properties);
491491
void menu_option(int p_option);
492492

493493
EditorInspectorSection();

0 commit comments

Comments
 (0)