diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 893eb110ca9..39ed889e919 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -655,10 +655,10 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: menu->clear(); menu->set_size(Size2(1, 1)); - if (p_name=="script/script" && hint_text=="Script" && owner->cast_to()) { - menu->add_icon_item(get_icon("Script","EditorIcons"),TTR("New Script"),OBJ_MENU_NEW_SCRIPT); + if (p_name == "script/script" && hint_text == "Script" && owner->cast_to()) { + menu->add_icon_item(get_icon("Script", "EditorIcons"), TTR("New Script"), OBJ_MENU_NEW_SCRIPT); menu->add_separator(); - } else if (hint_text!="") { + } else if (hint_text != "") { int idx = 0; for (int i = 0; i < hint_text.get_slice_count(","); i++) { diff --git a/editor/property_editor.h b/editor/property_editor.h index 916a543b7ba..18c6e4b8987 100644 --- a/editor/property_editor.h +++ b/editor/property_editor.h @@ -64,7 +64,7 @@ class CustomPropertyEditor : public Popup { OBJ_MENU_COPY = 4, OBJ_MENU_PASTE = 5, OBJ_MENU_REIMPORT = 6, - OBJ_MENU_NEW_SCRIPT=7, + OBJ_MENU_NEW_SCRIPT = 7, TYPE_BASE_ID = 100 }; diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 79720c0f8ee..9dd0a417b1d 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -60,7 +60,7 @@ void SceneTreeDock::_unhandled_key_input(InputEvent p_event) { _tool_selected(TOOL_DUPLICATE); } else if (ED_IS_SHORTCUT("scene_tree/attach_script", p_event)) { _tool_selected(TOOL_ATTACH_SCRIPT); - } else if(ED_IS_SHORTCUT("scene_tree/clear_script", p_event)) { + } else if (ED_IS_SHORTCUT("scene_tree/clear_script", p_event)) { _tool_selected(TOOL_CLEAR_SCRIPT); } else if (ED_IS_SHORTCUT("scene_tree/move_up", p_event)) { _tool_selected(TOOL_MOVE_UP); @@ -353,11 +353,11 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { } break; case TOOL_CLEAR_SCRIPT: { Node *selected = scene_tree->get_selected(); - if(!selected) + if (!selected) break; Ref