aboutsummaryrefslogtreecommitdiff
path: root/src/SearchBar.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-25 16:31:25 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-25 16:31:25 +0200
commit9aecfa8da5daae017ce3ff21fd6b496fda2a690b (patch)
tree677aa76a7d4c93852201551880dd33d0207c18d6 /src/SearchBar.cpp
parente9c88090ed49fbb9e4ae7ec5141ab0714509dc39 (diff)
Submit on suggestion should make the search bar text the selected text
Diffstat (limited to 'src/SearchBar.cpp')
-rw-r--r--src/SearchBar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index 0a7254b..33cea08 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -222,9 +222,14 @@ namespace QuickMedia {
backspace_pressed = false;
}
- void SearchBar::set_text(const std::string &text) {
+ void SearchBar::set_text(const std::string &text, bool update_search) {
clear();
append_text(text);
+
+ if(!update_search) {
+ needs_update = false;
+ updated_search = false;
+ }
}
void SearchBar::append_text(const std::string &text_to_add) {