diff options
author | Jacek Antonelli | 2008-08-15 23:45:37 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:37 -0500 |
commit | 31ba05810c641f14e8ab5da8ad2aaf527779f6c1 (patch) | |
tree | c4b8d635dfb657fa4cfee7c285f8cadbf24afa90 /linden/indra/newview/llpaneldirgroups.cpp | |
parent | Second Life viewer sources 1.19.1.1 (diff) | |
download | meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.zip meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.gz meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.bz2 meta-impy-31ba05810c641f14e8ab5da8ad2aaf527779f6c1.tar.xz |
Second Life viewer sources 1.19.1.2
Diffstat (limited to 'linden/indra/newview/llpaneldirgroups.cpp')
-rw-r--r-- | linden/indra/newview/llpaneldirgroups.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/linden/indra/newview/llpaneldirgroups.cpp b/linden/indra/newview/llpaneldirgroups.cpp index ab2ec38..0a0a14d 100644 --- a/linden/indra/newview/llpaneldirgroups.cpp +++ b/linden/indra/newview/llpaneldirgroups.cpp | |||
@@ -82,18 +82,16 @@ void LLPanelDirGroups::draw() | |||
82 | // virtual | 82 | // virtual |
83 | void LLPanelDirGroups::performQuery() | 83 | void LLPanelDirGroups::performQuery() |
84 | { | 84 | { |
85 | if (childGetValue("name").asString().length() < mMinSearchChars) | 85 | std::string group_name = childGetValue("name").asString(); |
86 | if (group_name.length() < mMinSearchChars) | ||
86 | { | 87 | { |
87 | return; | 88 | return; |
88 | } | 89 | } |
89 | 90 | ||
90 | // filter short words out of the query string | 91 | // "hi " is three chars but not a long-enough search |
91 | // and indidate if we did have to filter it | 92 | std::string query_string = group_name; |
92 | bool query_was_filtered = false; | 93 | LLString::trim( query_string ); |
93 | std::string query_string = LLPanelDirBrowser::filter_short_words( | 94 | bool query_was_filtered = (query_string != group_name); |
94 | childGetValue("name").asString(), | ||
95 | mMinSearchChars, | ||
96 | query_was_filtered ); | ||
97 | 95 | ||
98 | // possible we threw away all the short words in the query so check length | 96 | // possible we threw away all the short words in the query so check length |
99 | if ( query_string.length() < mMinSearchChars ) | 97 | if ( query_string.length() < mMinSearchChars ) |
@@ -107,7 +105,7 @@ void LLPanelDirGroups::performQuery() | |||
107 | { | 105 | { |
108 | LLString::format_map_t args; | 106 | LLString::format_map_t args; |
109 | args["[FINALQUERY]"] = query_string; | 107 | args["[FINALQUERY]"] = query_string; |
110 | gViewerWindow->alertXml("SeachFilteredOnShortWords"); | 108 | gViewerWindow->alertXml("SeachFilteredOnShortWords", args); |
111 | }; | 109 | }; |
112 | 110 | ||
113 | setupNewSearch(); | 111 | setupNewSearch(); |