diff options
Diffstat (limited to 'linden/indra/newview/llpaneldirplaces.cpp')
-rw-r--r-- | linden/indra/newview/llpaneldirplaces.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/linden/indra/newview/llpaneldirplaces.cpp b/linden/indra/newview/llpaneldirplaces.cpp index 9a761c4..3e79ec0 100644 --- a/linden/indra/newview/llpaneldirplaces.cpp +++ b/linden/indra/newview/llpaneldirplaces.cpp | |||
@@ -99,19 +99,16 @@ void LLPanelDirPlaces::draw() | |||
99 | // virtual | 99 | // virtual |
100 | void LLPanelDirPlaces::performQuery() | 100 | void LLPanelDirPlaces::performQuery() |
101 | { | 101 | { |
102 | LLString name = childGetValue("name").asString(); | 102 | LLString place_name = childGetValue("name").asString(); |
103 | if (name.length() < mMinSearchChars) | 103 | if (place_name.length() < mMinSearchChars) |
104 | { | 104 | { |
105 | return; | 105 | return; |
106 | } | 106 | } |
107 | 107 | ||
108 | // filter short words out of the query string | 108 | // "hi " is three chars but not a long-enough search |
109 | // and indidate if we did have to filter it | 109 | std::string query_string = place_name; |
110 | bool query_was_filtered = false; | 110 | LLString::trim( query_string ); |
111 | std::string query_string = LLPanelDirBrowser::filter_short_words( | 111 | bool query_was_filtered = (query_string != place_name); |
112 | name, | ||
113 | mMinSearchChars, | ||
114 | query_was_filtered ); | ||
115 | 112 | ||
116 | // possible we threw away all the short words in the query so check length | 113 | // possible we threw away all the short words in the query so check length |
117 | if ( query_string.length() < mMinSearchChars ) | 114 | if ( query_string.length() < mMinSearchChars ) |
@@ -125,7 +122,7 @@ void LLPanelDirPlaces::performQuery() | |||
125 | { | 122 | { |
126 | LLString::format_map_t args; | 123 | LLString::format_map_t args; |
127 | args["[FINALQUERY]"] = query_string; | 124 | args["[FINALQUERY]"] = query_string; |
128 | gViewerWindow->alertXml("SeachFilteredOnShortWords"); | 125 | gViewerWindow->alertXml("SeachFilteredOnShortWords", args); |
129 | }; | 126 | }; |
130 | 127 | ||
131 | LLString catstring = childGetValue("Category").asString(); | 128 | LLString catstring = childGetValue("Category").asString(); |