diff options
author | elektrahesse | 2010-09-16 12:39:58 +0200 |
---|---|---|
committer | elektrahesse | 2010-09-16 12:39:58 +0200 |
commit | 79f7c4c58e355fe78114a940d8c6efcd1e3ff15d (patch) | |
tree | 91a81cbc32382e128d4a2b6c114a70e42f29614b /linden/indra | |
parent | Added support for autocompletion of names also in the 'local chat' window (diff) | |
download | meta-impy-79f7c4c58e355fe78114a940d8c6efcd1e3ff15d.zip meta-impy-79f7c4c58e355fe78114a940d8c6efcd1e3ff15d.tar.gz meta-impy-79f7c4c58e355fe78114a940d8c6efcd1e3ff15d.tar.bz2 meta-impy-79f7c4c58e355fe78114a940d8c6efcd1e3ff15d.tar.xz |
Added CHAT_NORMAL_RADIUS check for autocompletion and deleted selection of last part upon new autocomplete attempt
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 8015e10..875153a 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp | |||
@@ -68,6 +68,7 @@ | |||
68 | #include "llmultigesture.h" | 68 | #include "llmultigesture.h" |
69 | #include "llui.h" | 69 | #include "llui.h" |
70 | #include "lluictrlfactory.h" | 70 | #include "lluictrlfactory.h" |
71 | #include "llvoavatar.h" | ||
71 | 72 | ||
72 | #include "chatbar_as_cmdline.h" | 73 | #include "chatbar_as_cmdline.h" |
73 | 74 | ||
@@ -216,6 +217,8 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) | |||
216 | 217 | ||
217 | if (!avatar_ids.empty()) | 218 | if (!avatar_ids.empty()) |
218 | { | 219 | { |
220 | mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one | ||
221 | |||
219 | std::string txt(mInputEditor->getText()); | 222 | std::string txt(mInputEditor->getText()); |
220 | 223 | ||
221 | std::string to_match(txt); | 224 | std::string to_match(txt); |
@@ -251,12 +254,23 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask ) | |||
251 | { | 254 | { |
252 | if (avatar_ids[i] == gAgent.getID() || avatar_ids[i].isNull()) | 255 | if (avatar_ids[i] == gAgent.getID() || avatar_ids[i].isNull()) |
253 | continue; | 256 | continue; |
254 | /* | 257 | |
255 | // Commented out for now... doesn't work above 1024 meters as usual | 258 | // Grab the pos again from the objects-in-view cache... LLWorld doesn't work above 1024 meters as usual :( |
259 | LLVector3d real_pos = positions[i]; | ||
260 | if (real_pos[2] == 0.0f) | ||
261 | { | ||
262 | LLViewerObject *av_obj = gObjectList.findObject(avatar_ids[i]); | ||
263 | if (av_obj != NULL && av_obj->isAvatar()) | ||
264 | { | ||
265 | LLVOAvatar* avatarp = (LLVOAvatar*)av_obj; | ||
266 | if (avatarp != NULL) | ||
267 | real_pos = avatarp->getPositionGlobal(); | ||
268 | } | ||
269 | } | ||
270 | |||
256 | F32 dist = F32(dist_vec(positions[i], gAgent.getPositionGlobal())); | 271 | F32 dist = F32(dist_vec(positions[i], gAgent.getPositionGlobal())); |
257 | if (dist > CHAT_NORMAL_RADIUS) | 272 | if (dist > CHAT_NORMAL_RADIUS) |
258 | continue; | 273 | continue; |
259 | */ | ||
260 | 274 | ||
261 | std::string agent_name = " "; | 275 | std::string agent_name = " "; |
262 | std::string agent_surname = " "; | 276 | std::string agent_surname = " "; |