summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelemojicomplete.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2022-11-08 00:16:58 +0100
committerKitty Barnett <develop@catznip.com>2022-11-08 01:05:01 +0100
commit81dd143d0d901e8e5234cff01fbda246e4621628 (patch)
tree948c765937ce5ebe57bb98115e8d6efa754c60c6 /indra/newview/llpanelemojicomplete.cpp
parentec6c4f102f8b23e0c79dd2c1c0ecbad54f019566 (diff)
[FIXED] Various minor issues
- Typing :+1: doesn't replace the short code with the thumbs-up emoji - Moving the mouse over the emoji complete panel highlights the wrong emoji when mScrollPos > 0 - Emoji complete panel is missing attributes - Crash when attempting to show the tooltip for an emoji text segment - Emoji autocomplete panel can sometimes show empty (type ':cat', select the heart eyed one, Ctrl-Z and then type 2 which should show the emoji for :cat2 but shows an empty square instead)
Diffstat (limited to 'indra/newview/llpanelemojicomplete.cpp')
-rw-r--r--indra/newview/llpanelemojicomplete.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llpanelemojicomplete.cpp b/indra/newview/llpanelemojicomplete.cpp
index a7058a6724..f890a14e8e 100644
--- a/indra/newview/llpanelemojicomplete.cpp
+++ b/indra/newview/llpanelemojicomplete.cpp
@@ -146,9 +146,9 @@ void LLPanelEmojiComplete::reshape(S32 width, S32 height, BOOL called_from_paren
void LLPanelEmojiComplete::setEmojiHint(const std::string& hint)
{
llwchar curEmoji = (mCurSelected < mEmojis.size()) ? mEmojis.at(mCurSelected) : 0;
- size_t curEmojiIdx = (curEmoji) ? mEmojis.find(curEmoji) : std::string::npos;
mEmojis = LLEmojiDictionary::instance().findMatchingEmojis(hint);
+ size_t curEmojiIdx = (curEmoji) ? mEmojis.find(curEmoji) : std::string::npos;
mCurSelected = (std::string::npos != curEmojiIdx) ? curEmojiIdx : 0;
if (mAutoSize)
@@ -168,7 +168,7 @@ size_t LLPanelEmojiComplete::posToIndex(S32 x, S32 y) const
{
if (mRenderRect.pointInRect(x, y))
{
- return llmin((size_t)x / mEmojiWidth, mEmojis.size() - 1);
+ return mScrollPos + llmin((size_t)x / mEmojiWidth, mEmojis.size() - 1);
}
return npos;
}