aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llchatbar.cpp
diff options
context:
space:
mode:
authorelektrahesse2010-09-17 19:34:41 +0200
committerelektrahesse2010-09-17 19:34:41 +0200
commitd871f00ecedddd0a8d67c143d80c5b32a80d5b62 (patch)
tree65e0c2e3a1676cb3039c248d9adb739fba676b4d /linden/indra/newview/llchatbar.cpp
parentMerge branch 'weekly' of git://github.com/mccabe/imprudence into weekly (diff)
downloadmeta-impy-d871f00ecedddd0a8d67c143d80c5b32a80d5b62.zip
meta-impy-d871f00ecedddd0a8d67c143d80c5b32a80d5b62.tar.gz
meta-impy-d871f00ecedddd0a8d67c143d80c5b32a80d5b62.tar.bz2
meta-impy-d871f00ecedddd0a8d67c143d80c5b32a80d5b62.tar.xz
Added a check to avoid triggering completion tests if text in chatbar is empty.
Diffstat (limited to 'linden/indra/newview/llchatbar.cpp')
-rw-r--r--linden/indra/newview/llchatbar.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp
index 2981958..eaa8cc8 100644
--- a/linden/indra/newview/llchatbar.cpp
+++ b/linden/indra/newview/llchatbar.cpp
@@ -215,16 +215,17 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
215 { 215 {
216 if (mInputEditor) 216 if (mInputEditor)
217 { 217 {
218 std::string txt(mInputEditor->getText());
219
218 std::vector<LLUUID> avatar_ids; 220 std::vector<LLUUID> avatar_ids;
219 std::vector<LLVector3d> positions; 221 std::vector<LLVector3d> positions;
220 LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); 222 LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
221 223
222 if (!avatar_ids.empty()) 224 if (!avatar_ids.empty() && !txt.empty())
223 { 225 {
224 mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one 226 mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one
225 227
226 S32 cursorPos = mInputEditor->getCursor(); 228 S32 cursorPos = mInputEditor->getCursor();
227 std::string txt(mInputEditor->getText());
228 229
229 if (mCompletionHolder.last_txt != mInputEditor->getText()) 230 if (mCompletionHolder.last_txt != mInputEditor->getText())
230 { 231 {