diff options
author | Richard Linden <none@none> | 2012-05-18 13:20:32 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-05-18 13:20:32 -0700 |
commit | 296e55c1b323c05b6544b69ace04afe19102396b (patch) | |
tree | a0d3a495061442b2adfb4342c5c490c039526489 /indra/newview/lltoastpanel.cpp | |
parent | cf86247b8c5e199447b7cd3dc645a42a6a645265 (diff) |
CHUI-112 FIX Clicking Show or Discard in an inventory offer toast does not dismiss toast
removed special case logic for dealing with user online/offline collisions
added ability to cancel old duplicate notifications
Diffstat (limited to 'indra/newview/lltoastpanel.cpp')
-rw-r--r-- | indra/newview/lltoastpanel.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index d2a4ce8745..e20d516392 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -78,11 +78,14 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) S32 requiredTextHeight = message->getTextBoundingRect().getHeight(); S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); - //Calculate last delta height deducting previous heightDelta - heightDelta = newTextHeight - oldTextHeight - heightDelta; + heightDelta = newTextHeight - oldTextHeight; + S32 new_panel_height = llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT); //reshape the panel with new height - reshape( getRect().getWidth(), llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT)); + if (new_panel_height != getRect().getHeight()) + { + reshape( getRect().getWidth(), new_panel_height); + } } } @@ -96,7 +99,7 @@ LLToastPanel* LLToastPanel::buidPanelFromNotification( if ("notifytip" == notification->getType()) { // if it is online/offline notification - if ("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) + if ("FriendOnlineOffline" == notification->getName()) { res = new LLPanelOnlineStatus(notification); } |