From c47c31fdbfb1c02de13bc7f17af1e7d173c048f3 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 31 Jan 2012 17:51:43 -0800 Subject: EXP-1513 FIX Underscore ( _ ) fails to show in first chat entry in Local Chat --- indra/newview/lltoastalertpanel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoastalertpanel.cpp') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 0f337825e9..12ad071799 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -70,7 +70,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor(NULL) { const LLFontGL* font = LLFontGL::getFontSansSerif(); - const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); + const S32 LINE_HEIGHT = font->getLineHeight(); const S32 EDITOR_HEIGHT = 20; LLNotificationFormPtr form = mNotification->getForm(); @@ -365,7 +365,7 @@ bool LLToastAlertPanel::setCheckBox( const std::string& check_title, const std:: } const LLFontGL* font = mCheck->getFont(); - const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); + const S32 LINE_HEIGHT = font->getLineHeight(); // Extend dialog for "check next time" S32 max_msg_width = LLToastPanel::getRect().getWidth() - 2 * HPAD; -- cgit v1.2.3 From b3960899066156bc7d3fd5befb2f7e687a328152 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Wed, 1 Feb 2012 17:15:22 +0200 Subject: EXP-1822 FIXED (After deleting an item from inventory and confirming "ok" to delete, focus leaves inventory) -Return focus to the previously focused view --- indra/newview/lltoastalertpanel.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/lltoastalertpanel.cpp') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 12ad071799..ada7570776 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -69,6 +69,15 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLabel(notification->getName()), mLineEditor(NULL) { + // EXP-1822 + // save currently focused view, so that return focus to it + // on destroying this toast. + LLView* current_selection = dynamic_cast(gFocusMgr.getKeyboardFocus()); + if (current_selection) + { + mPreviouslyFocusedView = current_selection->getHandle(); + } + const LLFontGL* font = LLFontGL::getFontSansSerif(); const S32 LINE_HEIGHT = font->getLineHeight(); const S32 EDITOR_HEIGHT = 20; @@ -408,6 +417,13 @@ LLToastAlertPanel::~LLToastAlertPanel() { LLTransientFloaterMgr::instance().removeControlView( LLTransientFloaterMgr::GLOBAL, this); + + // EXP-1822 + // return focus to the previously focused view + if (mPreviouslyFocusedView.get()) + { + gFocusMgr.setKeyboardFocus(mPreviouslyFocusedView.get()); + } } BOOL LLToastAlertPanel::hasTitleBar() const -- cgit v1.2.3 From ca80e17e90ce5b70feca76ddf41d3c25d01ac830 Mon Sep 17 00:00:00 2001 From: paulgproductengine Date: Thu, 9 Feb 2012 23:34:12 +0200 Subject: EXP-1822 FIXED (After deleting an item from inventory and confirming "ok" to delete, focus leaves inventory) - Return focus to the previously focused root view --- indra/newview/lltoastalertpanel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltoastalertpanel.cpp') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index ada7570776..9ba8431fde 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -73,9 +73,14 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal // save currently focused view, so that return focus to it // on destroying this toast. LLView* current_selection = dynamic_cast(gFocusMgr.getKeyboardFocus()); - if (current_selection) + while(current_selection) { - mPreviouslyFocusedView = current_selection->getHandle(); + if (current_selection->isFocusRoot()) + { + mPreviouslyFocusedView = current_selection->getHandle(); + break; + } + current_selection = current_selection->getParent(); } const LLFontGL* font = LLFontGL::getFontSansSerif(); @@ -422,7 +427,7 @@ LLToastAlertPanel::~LLToastAlertPanel() // return focus to the previously focused view if (mPreviouslyFocusedView.get()) { - gFocusMgr.setKeyboardFocus(mPreviouslyFocusedView.get()); + mPreviouslyFocusedView.get()->setFocus(TRUE); } } -- cgit v1.2.3