CHUI-695 Viewer crashes after attempt to accept a friendship in IM: remove an infinity loop of reshape()

master
AlexanderP ProductEngine 2013-01-23 19:47:01 +02:00
parent a6c4d127dd
commit daa9db305a
2 changed files with 5 additions and 5 deletions

View File

@ -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()
{

View File

@ -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())