aboutsummaryrefslogtreecommitdiff
path: root/src/SearchBar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SearchBar.cpp')
-rw-r--r--src/SearchBar.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index 5c3c35c..a621d02 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -68,7 +68,7 @@ namespace QuickMedia {
} else if(updated_autocomplete && elapsed_time >= autocomplete_search_delay) {
updated_autocomplete = false;
if(!show_placeholder && onAutocompleteRequestCallback)
- autocomplete_text.setString(onAutocompleteRequestCallback(text.getString()));
+ onAutocompleteRequestCallback(text.getString());
}
}
@@ -209,6 +209,10 @@ namespace QuickMedia {
}
}
+ void SearchBar::set_autocomplete_text(const std::string &text) {
+ autocomplete_text.setString(text);
+ }
+
void SearchBar::clear_autocomplete_if_text_not_substring() {
const sf::String &text_str = text.getString();
const sf::String &autocomplete_str = autocomplete_text.getString();