diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-06 16:35:23 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-06 16:35:23 +0200 |
commit | 75c4b955f60c466f383ebe39002e47d1fac314af (patch) | |
tree | 14eb27d57b1d92ae8dba21f9beb127035721a4f0 /editor/scene_tree_editor.cpp | |
parent | afb63944d00fd93d16576e2c8843bf78470a5e9e (diff) | |
parent | 33092b6f4519a1caef7158efaf3ee7a9c91732f5 (diff) |
Merge pull request #65932 from Mickeon/editor-scene-tree-filter-selection
Expose and warn about Node Filters in Scene Tree Dock
Diffstat (limited to 'editor/scene_tree_editor.cpp')
-rw-r--r-- | editor/scene_tree_editor.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 689570bcf6..abebd306e6 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -612,6 +612,7 @@ void SceneTreeEditor::_update_tree(bool p_scroll_to_selected) { bool SceneTreeEditor::_update_filter(TreeItem *p_parent, bool p_scroll_to_selected) { if (!p_parent) { p_parent = tree->get_root(); + filter_term_warning.clear(); } if (!p_parent) { @@ -704,8 +705,8 @@ bool SceneTreeEditor::_item_matches_all_terms(TreeItem *p_item, PackedStringArra return false; } } - } else { - WARN_PRINT(vformat(TTR("Special Node filter \"%s\" is not recognised. Available filters include \"type\" and \"group\"."), parameter)); + } else if (filter_term_warning.is_empty()) { + filter_term_warning = vformat(TTR("\"%s\" is not a known filter."), parameter); continue; } } else { @@ -1029,6 +1030,10 @@ String SceneTreeEditor::get_filter() const { return filter; } +String SceneTreeEditor::get_filter_term_warning() { + return filter_term_warning; +} + void SceneTreeEditor::set_undo_redo(Ref<EditorUndoRedoManager> p_undo_redo) { undo_redo = p_undo_redo; } |