diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/create_dialog.cpp | 4 | ||||
-rw-r--r-- | editor/editor_help_search.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 547d627925..8a8d52c6f1 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -210,13 +210,13 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p if (is_subsequence_of_type && !is_selected_equal) { if (is_substring_of_type) { - if (!is_substring_of_selected || (is_substring_of_selected && (current_type_prefered && !selected_type_prefered))) { + if (!is_substring_of_selected || (current_type_prefered && !selected_type_prefered)) { *to_select = item; } } else { // substring results weigh more than subsequences, so let's make sure we don't override them if (!is_substring_of_selected) { - if (!is_subsequence_of_selected || (is_subsequence_of_selected && (current_type_prefered && !selected_type_prefered))) { + if (!is_subsequence_of_selected || (current_type_prefered && !selected_type_prefered)) { *to_select = item; } } diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 4ec24c76f2..fbfc999dbf 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -337,7 +337,7 @@ bool EditorHelpSearch::Runner::_phase_match_classes() { if (term.length() > 1) { if (search_flags & SEARCH_METHODS) for (int i = 0; i < class_doc.methods.size(); i++) { - String method_name = search_flags & SEARCH_CASE_SENSITIVE ? class_doc.methods[i].name : class_doc.methods[i].name.to_lower(); + String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.methods[i].name : class_doc.methods[i].name.to_lower(); if (method_name.find(term) > -1 || (term.begins_with(".") && method_name.begins_with(term.right(1))) || (term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) || @@ -405,7 +405,7 @@ bool EditorHelpSearch::Runner::_phase_member_items() { ClassMatch &match = iterator_match->value(); - TreeItem *parent = search_flags & SEARCH_SHOW_HIERARCHY ? class_items[match.doc->name] : root_item; + TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item; for (int i = 0; i < match.methods.size(); i++) _create_method_item(parent, match.doc, match.methods[i]); for (int i = 0; i < match.signals.size(); i++) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 7f7ae8f273..fc72f25b04 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -6048,7 +6048,6 @@ void EditorSpatialGizmoPlugin::create_icon_material(const String &p_name, const void EditorSpatialGizmoPlugin::create_handle_material(const String &p_name, bool p_billboard) { Ref<SpatialMaterial> handle_material = Ref<SpatialMaterial>(memnew(SpatialMaterial)); - handle_material = Ref<SpatialMaterial>(memnew(SpatialMaterial)); handle_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true); handle_material->set_flag(SpatialMaterial::FLAG_USE_POINT_SIZE, true); Ref<Texture> handle_t = SpatialEditor::get_singleton()->get_icon("Editor3DHandle", "EditorIcons"); |