diff options
Diffstat (limited to 'linden/indra/newview/llgesturemgr.cpp')
-rw-r--r-- | linden/indra/newview/llgesturemgr.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/linden/indra/newview/llgesturemgr.cpp b/linden/indra/newview/llgesturemgr.cpp index 86b2242..06c8a66 100644 --- a/linden/indra/newview/llgesturemgr.cpp +++ b/linden/indra/newview/llgesturemgr.cpp | |||
@@ -507,9 +507,6 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s | |||
507 | // Only pay attention to the first gesture in the string. | 507 | // Only pay attention to the first gesture in the string. |
508 | if( !found_gestures ) | 508 | if( !found_gestures ) |
509 | { | 509 | { |
510 | std::string cur_token_lower = cur_token; | ||
511 | LLStringUtil::toLower(cur_token_lower); | ||
512 | |||
513 | // collect gestures that match | 510 | // collect gestures that match |
514 | std::vector <LLMultiGesture *> matching; | 511 | std::vector <LLMultiGesture *> matching; |
515 | item_map_t::iterator it; | 512 | item_map_t::iterator it; |
@@ -520,7 +517,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s | |||
520 | // Gesture asset data might not have arrived yet | 517 | // Gesture asset data might not have arrived yet |
521 | if (!gesture) continue; | 518 | if (!gesture) continue; |
522 | 519 | ||
523 | if (gesture->mTrigger == cur_token_lower) | 520 | if (LLStringUtil::compareInsensitive(gesture->mTrigger, cur_token) == 0) |
524 | { | 521 | { |
525 | matching.push_back(gesture); | 522 | matching.push_back(gesture); |
526 | } | 523 | } |
@@ -548,10 +545,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s | |||
548 | } | 545 | } |
549 | 546 | ||
550 | // Don't muck with the user's capitalization if we don't have to. | 547 | // Don't muck with the user's capitalization if we don't have to. |
551 | std::string output = gesture->mReplaceText; | 548 | if( LLStringUtil::compareInsensitive(cur_token, gesture->mReplaceText) == 0) |
552 | std::string output_lower = output; | ||
553 | LLStringUtil::toLower(output_lower); | ||
554 | if( cur_token_lower == output_lower ) | ||
555 | { | 549 | { |
556 | if (revised_string) | 550 | if (revised_string) |
557 | revised_string->append( cur_token ); | 551 | revised_string->append( cur_token ); |
@@ -559,7 +553,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s | |||
559 | else | 553 | else |
560 | { | 554 | { |
561 | if (revised_string) | 555 | if (revised_string) |
562 | revised_string->append( output ); | 556 | revised_string->append( gesture->mReplaceText ); |
563 | } | 557 | } |
564 | } | 558 | } |
565 | found_gestures = TRUE; | 559 | found_gestures = TRUE; |