summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/collada/collada.cpp3
-rw-r--r--editor/connections_dialog.cpp4
-rw-r--r--editor/doc/doc_dump.cpp6
-rw-r--r--editor/editor_node.cpp3
-rw-r--r--editor/editor_properties.cpp9
-rw-r--r--editor/editor_properties_array_dict.cpp6
-rw-r--r--editor/editor_themes.cpp2
-rw-r--r--editor/filesystem_dock.cpp10
-rw-r--r--editor/filesystem_dock.h1
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp7
-rw-r--r--editor/output_strings.cpp3
-rw-r--r--editor/plugins/animation_tree_player_editor_plugin.cpp15
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp6
-rw-r--r--editor/plugins/baked_lightmap_editor_plugin.cpp3
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp3
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp3
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp9
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp21
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp3
-rw-r--r--editor/project_settings_editor.cpp6
-rw-r--r--editor/property_editor.cpp21
22 files changed, 99 insertions, 47 deletions
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp
index 94e6d4ded0..94a37a3118 100644
--- a/editor/collada/collada.cpp
+++ b/editor/collada/collada.cpp
@@ -166,7 +166,8 @@ Transform Collada::Node::compute_transform(Collada &state) const {
}
} break;
- default: {}
+ default: {
+ }
}
xform = xform * xform_step;
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index f775a0a14b..045158504a 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -160,7 +160,9 @@ void ConnectDialog::_add_bind() {
case Variant::BASIS: value = Basis(); break;
case Variant::TRANSFORM: value = Transform(); break;
case Variant::COLOR: value = Color(); break;
- default: { ERR_FAIL(); } break;
+ default: {
+ ERR_FAIL();
+ } break;
}
ERR_FAIL_COND(value.get_type() == Variant::NIL);
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index 1a68fe5bf2..6ccf0e26ea 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -199,7 +199,8 @@ void DocDump::dump(const String &p_file) {
case Variant::ARRAY:
case Variant::_RID:
- default: {}
+ default: {
+ }
}
_write_string(f, 3, "<argument index=\"" + itos(i) + "\" name=\"" + _escape_string(arginfo.name) + "\" type=\"" + type_name + "\" default=\"" + _escape_string(default_arg_text) + "\">");
@@ -227,7 +228,8 @@ void DocDump::dump(const String &p_file) {
}
break;
case PROPERTY_HINT_FILE: hint = "A file:"; break;
- default: {}
+ default: {
+ }
//case PROPERTY_HINT_RESOURCE_TYPE: hint="Type: "+arginfo.hint_string; break;
};
if (hint != "")
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index c19b497ad5..8a67002503 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -924,7 +924,8 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool>
ret_changed = true;
}
} break;
- default: {}
+ default: {
+ }
}
}
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 0e8cd955b5..31f53305e2 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2883,7 +2883,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
case PROPERTY_HINT_LAYERS_3D_PHYSICS:
lt = EditorPropertyLayers::LAYER_PHYSICS_3D;
break;
- default: {} //compiler could be smarter here and realize this can't happen
+ default: {
+ } //compiler could be smarter here and realize this can't happen
}
EditorPropertyLayers *editor = memnew(EditorPropertyLayers);
editor->setup(lt);
@@ -3020,7 +3021,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
case PROPERTY_HINT_PROPERTY_OF_BASE_TYPE: type = EditorPropertyMember::MEMBER_PROPERTY_OF_BASE_TYPE; break;
case PROPERTY_HINT_PROPERTY_OF_INSTANCE: type = EditorPropertyMember::MEMBER_PROPERTY_OF_INSTANCE; break;
case PROPERTY_HINT_PROPERTY_OF_SCRIPT: type = EditorPropertyMember::MEMBER_PROPERTY_OF_SCRIPT; break;
- default: {}
+ default: {
+ }
}
editor->setup(type, p_hint_text);
add_property_editor(p_path, editor);
@@ -3284,7 +3286,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(Variant::POOL_COLOR_ARRAY);
add_property_editor(p_path, editor);
} break;
- default: {}
+ default: {
+ }
}
return false; //can be overridden, although it will most likely be last anyway
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index 0f6c6349ed..e3dc517a39 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -251,7 +251,8 @@ void EditorPropertyArray::update_property() {
case Variant::POOL_COLOR_ARRAY: {
arrtype = "PoolColorArray";
} break;
- default: {}
+ default: {
+ }
}
if (array.get_type() == Variant::NIL) {
@@ -862,7 +863,8 @@ void EditorPropertyDictionary::update_property() {
editor->setup(Variant::POOL_COLOR_ARRAY);
prop = editor;
} break;
- default: {}
+ default: {
+ }
}
if (i == amount) {
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 335e3fcd29..0869f6ce77 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -204,7 +204,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
}
// generate thumb files with the given thumb size
- bool force_filter = !(p_thumb_size == 64 && p_thumb_size == 32); // we don't need filter with original resolution
+ bool force_filter = p_thumb_size != 64 && p_thumb_size != 32; // we don't need filter with original resolution
if (p_thumb_size >= 64) {
float scale = (float)p_thumb_size / 64.0 * EDSCALE;
for (int i = 0; i < editor_bg_thumbs_count; i++) {
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 7462783c11..5a1383be6d 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2125,6 +2125,10 @@ void FileSystemDock::_tree_rmb_select(const Vector2 &p_pos) {
}
}
+void FileSystemDock::_tree_empty_selected() {
+ tree->deselect_all();
+}
+
void FileSystemDock::_file_list_rmb_select(int p_item, const Vector2 &p_pos) {
// Right click is pressed in the file list
Vector<String> paths;
@@ -2308,9 +2312,10 @@ void FileSystemDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_toggle_split_mode"), &FileSystemDock::_toggle_split_mode);
ClassDB::bind_method(D_METHOD("_tree_rmb_option", "option"), &FileSystemDock::_tree_rmb_option);
- ClassDB::bind_method(D_METHOD("_file_list_rmb_option", "option"), &FileSystemDock::_file_list_rmb_option);
-
ClassDB::bind_method(D_METHOD("_tree_rmb_select"), &FileSystemDock::_tree_rmb_select);
+ ClassDB::bind_method(D_METHOD("_tree_empty_selected"), &FileSystemDock::_tree_empty_selected);
+
+ ClassDB::bind_method(D_METHOD("_file_list_rmb_option", "option"), &FileSystemDock::_file_list_rmb_option);
ClassDB::bind_method(D_METHOD("_file_list_rmb_select"), &FileSystemDock::_file_list_rmb_select);
ClassDB::bind_method(D_METHOD("_file_list_rmb_pressed"), &FileSystemDock::_file_list_rmb_pressed);
@@ -2445,6 +2450,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
tree->connect("item_activated", this, "_tree_activate_file");
tree->connect("multi_selected", this, "_tree_multi_selected");
tree->connect("item_rmb_selected", this, "_tree_rmb_select");
+ tree->connect("nothing_selected", this, "_tree_empty_selected");
tree->connect("gui_input", this, "_tree_gui_input");
file_list_vb = memnew(VBoxContainer);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index f6de712d17..8b27938c8a 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -237,6 +237,7 @@ private:
void _tree_rmb_select(const Vector2 &p_pos);
void _file_list_rmb_select(int p_item, const Vector2 &p_pos);
void _file_list_rmb_pressed(const Vector2 &p_pos);
+ void _tree_empty_selected();
struct FileInfo {
String name;
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index e6e29df133..daa423e1d9 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -581,7 +581,9 @@ int EditorSceneImporterGLTF::_get_component_type_size(int component_type) {
case COMPONENT_TYPE_UNSIGNED_SHORT: return 2; break;
case COMPONENT_TYPE_INT: return 4; break;
case COMPONENT_TYPE_FLOAT: return 4; break;
- default: { ERR_FAIL_V(0); }
+ default: {
+ ERR_FAIL_V(0);
+ }
}
return 0;
}
@@ -631,7 +633,8 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, int p
element_size = 16; //override for this case
}
} break;
- default: {}
+ default: {
+ }
}
Vector<double> dst_buffer;
diff --git a/editor/output_strings.cpp b/editor/output_strings.cpp
index 24b44f078f..baabaff9a8 100644
--- a/editor/output_strings.cpp
+++ b/editor/output_strings.cpp
@@ -105,7 +105,8 @@ void OutputStrings::_notification(int p_what) {
case LINE_LINK: {
} break;
- default: {}
+ default: {
+ }
}
line_ofs.y += font->get_ascent();
diff --git a/editor/plugins/animation_tree_player_editor_plugin.cpp b/editor/plugins/animation_tree_player_editor_plugin.cpp
index e2a44069d9..e21ae4834d 100644
--- a/editor/plugins/animation_tree_player_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -200,7 +200,8 @@ void AnimationTreePlayerEditor::_edit_dialog_changed() {
if (anim_tree->transition_node_get_current(edited_node) != edit_option->get_selected())
anim_tree->transition_node_set_current(edited_node, edit_option->get_selected());
} break;
- default: {}
+ default: {
+ }
}
}
@@ -457,7 +458,8 @@ void AnimationTreePlayerEditor::_popup_edit_dialog() {
edit_dialog->set_size(Size2(150, 100));
} break;
- default: {}
+ default: {
+ }
}
}
@@ -555,7 +557,8 @@ void AnimationTreePlayerEditor::_draw_node(const StringName &p_node) {
text += "->";
break;
- default: {}
+ default: {
+ }
}
font->draw(ci, ofs + ascofs + Point2(3, 0), text, font_color);
@@ -740,7 +743,8 @@ void AnimationTreePlayerEditor::_gui_input(Ref<InputEvent> p_event) {
//open editor
//_node_edit_property(click_node);
} break;
- default: {}
+ default: {
+ }
}
}
if (mb->get_button_index() == 2) {
@@ -817,7 +821,8 @@ void AnimationTreePlayerEditor::_gui_input(Ref<InputEvent> p_event) {
anim_tree->node_set_position(click_node, new_pos);
} break;
- default: {}
+ default: {
+ }
}
click_type = CLICK_NONE;
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 6d2cdfc583..386bc1738e 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -454,7 +454,8 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
progress->set_max(1);
progress->set_value(0);
} break;
- default: {}
+ default: {
+ }
}
prev_status = cstatus;
}
@@ -612,7 +613,8 @@ void EditorAssetLibrary::_notification(int p_what) {
case HTTPClient::STATUS_BODY: {
load_status->set_value(0.4);
} break;
- default: {}
+ default: {
+ }
}
}
diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/baked_lightmap_editor_plugin.cpp
index d90ff95c1f..d75f06de12 100644
--- a/editor/plugins/baked_lightmap_editor_plugin.cpp
+++ b/editor/plugins/baked_lightmap_editor_plugin.cpp
@@ -50,7 +50,8 @@ void BakedLightmapEditorPlugin::_bake() {
case BakedLightmap::BAKE_ERROR_CANT_CREATE_IMAGE:
EditorNode::get_singleton()->show_warning(TTR("Failed creating lightmap images, make sure path is writable."));
break;
- default: {}
+ default: {
+ }
}
}
}
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index 89eb253afe..18586b2fe5 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -61,7 +61,8 @@ void MeshLibraryEditor::_menu_confirm() {
_import_scene_cbk(existing);
} break;
- default: {};
+ default: {
+ };
}
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 0dbbaf4177..af43f679fd 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -905,7 +905,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
bone_paint_pos = Vector2(mm->get_position().x, mm->get_position().y);
} break;
- default: {}
+ default: {
+ }
}
if (bone_painting) {
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 42aba78e96..d7d4cec07d 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1735,7 +1735,7 @@ void ScriptEditor::_update_script_names() {
String name = eh->get_class();
Ref<Texture> icon = get_icon("Help", "EditorIcons");
- String tooltip = name + TTR(" Class Reference");
+ String tooltip = vformat(TTR("%s Class Reference"), name);
_ScriptEditorItemData sd;
sd.icon = icon;
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index f48887d342..ba297539d3 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -1637,7 +1637,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
surface->update();
} break;
- default: {}
+ default: {
+ }
}
}
@@ -1704,7 +1705,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} break;
- default: {}
+ default: {
+ }
}
}
@@ -1760,7 +1762,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} break;
- default: {}
+ default: {
+ }
}
}
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 5bc1067718..03277159fc 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -770,7 +770,8 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
spin_z_index->show();
}
} break;
- default: {}
+ default: {
+ }
}
_update_toggle_shape_button();
workspace->update();
@@ -940,7 +941,8 @@ void TileSetEditor::_on_workspace_draw() {
spin_z_index->set_value(tileset->autotile_get_z_index(get_current_tile(), edited_shape_coord));
draw_highlight_subtile(edited_shape_coord);
} break;
- default: {}
+ default: {
+ }
}
}
@@ -1570,7 +1572,8 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
}
}
} break;
- default: {}
+ default: {
+ }
}
}
}
@@ -1724,7 +1727,8 @@ void TileSetEditor::_on_tool_clicked(int p_tool) {
undo_redo->commit_action();
}
} break;
- default: {}
+ default: {
+ }
}
}
} else if (p_tool == TOOL_SELECT) {
@@ -1894,7 +1898,8 @@ void TileSetEditor::_select_next_tile() {
edited_shape_coord = Vector2();
_select_edited_shape_coord();
} break;
- default: {}
+ default: {
+ }
}
}
}
@@ -1931,7 +1936,8 @@ void TileSetEditor::_select_previous_tile() {
edited_shape_coord = cell_count;
_select_edited_shape_coord();
} break;
- default: {}
+ default: {
+ }
}
}
}
@@ -2668,7 +2674,8 @@ void TileSetEditor::draw_polygon_shapes() {
}
}
} break;
- default: {}
+ default: {
+ }
}
if (creating_shape) {
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index f71ff84bbe..0eeb104777 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -453,7 +453,8 @@ void VisualShaderEditor::_update_graph() {
Vector3 v = default_value;
button->set_text(String::num(v.x, 3) + "," + String::num(v.y, 3) + "," + String::num(v.z, 3));
} break;
- default: {}
+ default: {
+ }
}
}
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index bb72c621be..2d7ad8bc04 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -294,7 +294,8 @@ void ProjectSettingsEditor::_device_input_add() {
ie = jb;
} break;
- default: {}
+ default: {
+ }
}
if (idx < 0 || idx >= events.size()) {
@@ -519,7 +520,8 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
}
} break;
- default: {}
+ default: {
+ }
}
}
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index c45a97800c..4fa1bd74fe 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -310,7 +310,8 @@ void CustomPropertyEditor::_menu_option(int p_which) {
}
} break;
- default: {}
+ default: {
+ }
}
}
@@ -1049,7 +1050,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
case Variant::POOL_COLOR_ARRAY: {
} break;
- default: {}
+ default: {
+ }
}
updating = false;
@@ -1091,7 +1093,8 @@ void CustomPropertyEditor::_file_selected(String p_file) {
emit_signal("variant_changed");
hide();
} break;
- default: {}
+ default: {
+ }
}
}
@@ -1432,7 +1435,8 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
} break;
- default: {};
+ default: {
+ };
}
}
@@ -1699,7 +1703,8 @@ void CustomPropertyEditor::_modified(String p_string) {
case Variant::POOL_COLOR_ARRAY: {
} break;
- default: {}
+ default: {
+ }
}
updating = false;
@@ -1753,7 +1758,8 @@ void CustomPropertyEditor::_focus_enter() {
}
}
} break;
- default: {}
+ default: {
+ }
}
}
@@ -1774,7 +1780,8 @@ void CustomPropertyEditor::_focus_exit() {
value_editor[i]->select(0, 0);
}
} break;
- default: {}
+ default: {
+ }
}
}