Drop `TreeSearchPanel::set_text`.

This commit is contained in:
Alexander Montag 2024-09-30 14:22:23 +00:00
parent 10c8f58ca9
commit 683834f58e
No known key found for this signature in database
GPG Key ID: 07FE50B35A2B7524
2 changed files with 3 additions and 8 deletions

View File

@ -544,17 +544,13 @@ TreeSearch::SearchInfo TreeSearchPanel::get_search_info() const {
return result; return result;
} }
void TreeSearchPanel::set_search_info(TreeSearch::SearchInfo p_search_info) { void TreeSearchPanel::set_search_info(const TreeSearch::SearchInfo &p_search_info) {
line_edit_search->set_text(p_search_info.search_mask); line_edit_search->set_text(p_search_info.search_mask);
check_button_filter_highlight->set_pressed(p_search_info.search_mode == TreeSearch::TreeSearchMode::FILTER); check_button_filter_highlight->set_pressed(p_search_info.search_mode == TreeSearch::TreeSearchMode::FILTER);
set_visible(p_search_info.visible); set_visible(p_search_info.visible);
emit_signal("update_requested"); emit_signal("update_requested");
} }
void TreeSearchPanel::set_text(const String &p_text) {
line_edit_search->set_text(p_text);
}
void TreeSearchPanel::focus_editor() { void TreeSearchPanel::focus_editor() {
line_edit_search->grab_focus(); line_edit_search->grab_focus();
} }

View File

@ -138,11 +138,10 @@ protected:
static void _bind_methods(); static void _bind_methods();
public: public:
TreeSearch::TreeSearchMode get_search_mode() const;
String get_text() const; String get_text() const;
TreeSearch::TreeSearchMode get_search_mode() const;
TreeSearch::SearchInfo get_search_info() const; TreeSearch::SearchInfo get_search_info() const;
void set_search_info(TreeSearch::SearchInfo p_search_info); void set_search_info(const TreeSearch::SearchInfo &p_search_info);
void set_text(const String &p_text);
void focus_editor(); void focus_editor();
TreeSearchPanel(); TreeSearchPanel();
}; };