diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/action_map_editor.cpp | 7 | ||||
-rw-r--r-- | editor/create_dialog.cpp | 8 | ||||
-rw-r--r-- | editor/editor_command_palette.cpp | 2 | ||||
-rw-r--r-- | editor/editor_properties.cpp | 3 | ||||
-rw-r--r-- | editor/editor_resource_picker.cpp | 16 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/project_manager.cpp | 2 | ||||
-rw-r--r-- | editor/script_create_dialog.cpp | 2 |
10 files changed, 19 insertions, 31 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 9b1ff78727..3b9d6c18eb 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "editor/action_map_editor.h" + #include "editor/editor_scale.h" #include "editor/event_listener_line_edit.h" #include "editor/input_event_configuration_dialog.h" @@ -395,15 +396,9 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info action_tree->clear(); TreeItem *root = action_tree->create_item(); - int uneditable_count = 0; - for (int i = 0; i < actions_cache.size(); i++) { ActionInfo action_info = actions_cache[i]; - if (!action_info.editable) { - uneditable_count++; - } - const Array events = action_info.action["events"]; if (!_should_display_action(action_info.name, events)) { continue; diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 6142856f75..545b0895b0 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -284,12 +284,12 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String bool can_instantiate = (p_type_category == TypeCategory::CPP_TYPE && ClassDB::can_instantiate(p_type)) || p_type_category == TypeCategory::OTHER_TYPE; - if (!can_instantiate) { - r_item->set_custom_color(0, search_options->get_theme_color(SNAME("disabled_font_color"), SNAME("Editor"))); + if (can_instantiate && !ClassDB::is_virtual(p_type)) { + r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback)); + } else { r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, "NodeDisabled")); + r_item->set_custom_color(0, search_options->get_theme_color(SNAME("disabled_font_color"), SNAME("Editor"))); r_item->set_selectable(0, false); - } else { - r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback)); } bool is_deprecated = EditorHelp::get_doc_data()->class_list[p_type].is_deprecated; diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index a0913265eb..3f93fa1f41 100644 --- a/editor/editor_command_palette.cpp +++ b/editor/editor_command_palette.cpp @@ -226,7 +226,7 @@ void EditorCommandPalette::_add_command(String p_command_name, String p_key_name void EditorCommandPalette::execute_command(String &p_command_key) { ERR_FAIL_COND_MSG(!commands.has(p_command_key), p_command_key + " not found."); commands[p_command_key].last_used = OS::get_singleton()->get_unix_time(); - commands[p_command_key].callable.call_deferredp(nullptr, 0); + commands[p_command_key].callable.call_deferred(); _save_history(); } diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index d76dce0c1d..d71976a1af 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1045,7 +1045,6 @@ void EditorPropertyLayersGrid::_notification(int p_what) { const int vofs = (grid_size.height - h) / 2; int layer_index = 0; - int block_index = 0; Point2 arrow_pos; @@ -1112,8 +1111,6 @@ void EditorPropertyLayersGrid::_notification(int p_what) { break; } } - - ++block_index; } if ((expansion_rows != prev_expansion_rows) && expanded) { diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index 7c1e3e63ef..0b38996b2d 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -570,13 +570,17 @@ void EditorResourcePicker::_get_allowed_types(bool p_with_convert, HashSet<Strin for (int i = 0; i < size; i++) { String base = allowed_types[i].strip_edges(); - p_vector->insert(base); + if (!ClassDB::is_virtual(base)) { + p_vector->insert(base); + } // If we hit a familiar base type, take all the data from cache. if (allowed_types_cache.has(base)) { List<StringName> allowed_subtypes = allowed_types_cache[base]; for (const StringName &subtype_name : allowed_subtypes) { - p_vector->insert(subtype_name); + if (!ClassDB::is_virtual(subtype_name)) { + p_vector->insert(subtype_name); + } } } else { List<StringName> allowed_subtypes; @@ -586,13 +590,17 @@ void EditorResourcePicker::_get_allowed_types(bool p_with_convert, HashSet<Strin ClassDB::get_inheriters_from_class(base, &inheriters); } for (const StringName &subtype_name : inheriters) { - p_vector->insert(subtype_name); + if (!ClassDB::is_virtual(subtype_name)) { + p_vector->insert(subtype_name); + } allowed_subtypes.push_back(subtype_name); } for (const StringName &subtype_name : global_classes) { if (EditorNode::get_editor_data().script_class_is_parent(subtype_name, base)) { - p_vector->insert(subtype_name); + if (!ClassDB::is_virtual(subtype_name)) { + p_vector->insert(subtype_name); + } allowed_subtypes.push_back(subtype_name); } } diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 8ede88a888..a6a0eef11b 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1276,14 +1276,12 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap< } break; } - int idx = 0; for (const Ref<Shape3D> &E : shapes) { CollisionShape3D *cshape = memnew(CollisionShape3D); cshape->set_shape(E); base->add_child(cshape, true); cshape->set_owner(base->get_owner()); - idx++; } } } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 1d6f41d4c4..e6e32f882f 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -2068,12 +2068,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { } } - int index = 0; for (CanvasItem *ci : drag_selection) { Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform(); - ci->_edit_set_position(ci->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos)); - index++; } return true; } @@ -2191,12 +2188,9 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) { new_pos = previous_pos + (drag_to - drag_from); } - int index = 0; for (CanvasItem *ci : drag_selection) { Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform(); - ci->_edit_set_position(ci->_edit_get_position() + xform.xform(new_pos) - xform.xform(previous_pos)); - index++; } } return true; diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index a7a8d526d0..b0c8597adf 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -242,7 +242,7 @@ void TextureRegionEditor::_region_draw() { hscroll->set_value((hscroll->get_min() + hscroll->get_max() - hscroll->get_page()) / 2); vscroll->set_value((vscroll->get_min() + vscroll->get_max() - vscroll->get_page()) / 2); // This ensures that the view is updated correctly. - callable_mp(this, &TextureRegionEditor::_pan_callback).bind(Vector2(1, 0)).call_deferredp(nullptr, 0); + callable_mp(this, &TextureRegionEditor::_pan_callback).bind(Vector2(1, 0)).call_deferred(); request_center = false; } diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 588746bf64..b2a2566ad4 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -546,7 +546,6 @@ private: Vector<String> failed_files; - int idx = 0; while (ret == UNZ_OK) { //get filename unz_file_info info; @@ -585,7 +584,6 @@ private: } } - idx++; ret = unzGoToNextFile(pkg); } diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 14bb86acbc..08c0f0f708 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -275,7 +275,6 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must bool found = false; bool match = false; - int index = 0; for (const String &E : extensions) { if (E.nocasecmp_to(extension) == 0) { found = true; @@ -284,7 +283,6 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must } break; } - index++; } if (!found) { |