summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 5804d8701b..fcfd47b365 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -454,14 +454,15 @@ void LLFloaterIMSessionTab::onInputEditorClicked()
void LLFloaterIMSessionTab::onEmojiRecentPanelToggleBtnClicked(LLFloaterIMSessionTab* self)
{
- bool restore_focus = (gFocusMgr.getLastKeyboardFocus() == self->mInputEditor);
+ bool show = !self->mEmojiRecentPanel->getVisible();
+ bool restore_focus = !show || (gFocusMgr.getLastKeyboardFocus() == self->mInputEditor);
- BOOL show = !self->mEmojiRecentPanel->getVisible();
- if (show)
- {
+ if (show)
+ {
self->initEmojiRecentPanel(!restore_focus);
- }
- self->mEmojiRecentPanel->setVisible(show);
+ }
+
+ self->mEmojiRecentPanel->setVisible(show ? TRUE : FALSE);
if (restore_focus)
{