diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2013-01-23 19:47:01 +0200 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2013-01-23 19:47:01 +0200 |
commit | daa9db305a5ae2c0c5b0c2425d6482de6dee7b2c (patch) | |
tree | b475fef5981ac4a5057b0dc10ab91f49011f2d33 /indra/newview | |
parent | a6c4d127dd6ad66f9953344387e100bcff000ce5 (diff) |
CHUI-695 Viewer crashes after attempt to accept a friendship in IM: remove an infinity loop of reshape()
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltoastpanel.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 268b68b539..0aab514531 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -537,11 +537,9 @@ LLIMToastNotifyPanel::~LLIMToastNotifyPanel() } void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) - { - LLToastPanel::reshape(width, height, called_from_parent); - +{ snapToMessageHeight(mTextBox, MAX_LENGTH); - } +} void LLIMToastNotifyPanel::compactButtons() { diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index 187aee207c..54d3912136 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -81,7 +81,9 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) S32 newTextHeight = llmin(requiredTextHeight, maxTextHeight); heightDelta = newTextHeight - oldTextHeight; - S32 new_panel_height = llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT); + S32 new_panel_height = llmin( + llmax(getRect().getHeight() + heightDelta, MIN_PANEL_HEIGHT), + maxTextHeight); //reshape the panel with new height if (new_panel_height != getRect().getHeight()) |