aboutsummaryrefslogtreecommitdiff
path: root/src/SearchBar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SearchBar.cpp')
-rw-r--r--src/SearchBar.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp
index e646546..419ca38 100644
--- a/src/SearchBar.cpp
+++ b/src/SearchBar.cpp
@@ -161,8 +161,12 @@ namespace QuickMedia {
}
} else if(codepoint == 13) { // Return
bool clear_search = true;
- if(onTextSubmitCallback)
- clear_search = onTextSubmitCallback(show_placeholder ? "" : text.getString());
+ if(onTextSubmitCallback) {
+ if(show_placeholder)
+ clear_search = onTextSubmitCallback("");
+ else
+ clear_search = onTextSubmitCallback(text.getString());
+ }
if(clear_search)
clear();