summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp12
-rw-r--r--indra/newview/llpanelemojicomplete.cpp13
2 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 04385409ca..5804d8701b 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -495,11 +495,11 @@ void LLFloaterIMSessionTab::initEmojiRecentPanel(bool moveFocus)
std::list<llwchar>& recentlyUsed = LLFloaterEmojiPicker::getRecentlyUsed();
if (recentlyUsed.empty())
{
- mEmojiRecentEmptyText->setVisible(true);
- mEmojiRecentIconsCtrl->setVisible(false);
+ mEmojiRecentEmptyText->setVisible(TRUE);
+ mEmojiRecentIconsCtrl->setVisible(FALSE);
if (moveFocus)
{
- mEmojiPickerToggleBtn->setFocus(true);
+ mEmojiPickerToggleBtn->setFocus(TRUE);
}
}
else
@@ -510,11 +510,11 @@ void LLFloaterIMSessionTab::initEmojiRecentPanel(bool moveFocus)
emojis += emoji;
}
mEmojiRecentIconsCtrl->setEmojis(emojis);
- mEmojiRecentEmptyText->setVisible(false);
- mEmojiRecentIconsCtrl->setVisible(true);
+ mEmojiRecentEmptyText->setVisible(FALSE);
+ mEmojiRecentIconsCtrl->setVisible(TRUE);
if (moveFocus)
{
- mEmojiRecentIconsCtrl->setFocus(true);
+ mEmojiRecentIconsCtrl->setFocus(TRUE);
}
}
}
diff --git a/indra/newview/llpanelemojicomplete.cpp b/indra/newview/llpanelemojicomplete.cpp
index 29e1a29ed3..9bfe04fc31 100644
--- a/indra/newview/llpanelemojicomplete.cpp
+++ b/indra/newview/llpanelemojicomplete.cpp
@@ -285,7 +285,14 @@ void LLPanelEmojiComplete::onCommit()
void LLPanelEmojiComplete::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLUICtrl::reshape(width, height, called_from_parent);
- updateConstraints();
+ if (mAutoSize)
+ {
+ updateConstraints();
+ }
+ else
+ {
+ onEmojisChanged();
+ }
}
void LLPanelEmojiComplete::setEmojis(const LLWString& emojis)
@@ -373,7 +380,9 @@ void LLPanelEmojiComplete::onEmojisChanged()
}
else
{
- mVisibleEmojis = mVertical ? getRect().getHeight() / mEmojiHeight : getRect().getWidth() / mEmojiWidth;
+ mVisibleEmojis = mVertical ?
+ mEmojiHeight ? getRect().getHeight() / mEmojiHeight : 0 :
+ mEmojiWidth ? getRect().getWidth() / mEmojiWidth : 0;
}
updateConstraints();