*CTextBox: fix freezes in channellist and bedit

refreshTextLineArray() was to much in reSizeMainFrameHeight() and
initFramesRel(), caused endless loops under certain circumstances
This commit is contained in:
2012-09-20 09:37:15 +02:00
parent 550300078e
commit 1244af4666

View File

@@ -228,8 +228,7 @@ void CTextBox::reSizeMainFrameWidth(int textWidth)
m_cFrame.iWidth = iNewWindowWidth; m_cFrame.iWidth = iNewWindowWidth;
/* Re-Init the children frames due to new main window */ /* Re-Init the children frames due to new main window */
//Initialise the window frames first and than refresh text line array initFramesRel();
initFramesAndTextArray();
} }
void CTextBox::reSizeMainFrameHeight(int textHeight) void CTextBox::reSizeMainFrameHeight(int textHeight)
@@ -247,8 +246,7 @@ void CTextBox::reSizeMainFrameHeight(int textHeight)
m_cFrame.iHeight = iNewWindowHeight; m_cFrame.iHeight = iNewWindowHeight;
/* Re-Init the children frames due to new main window */ /* Re-Init the children frames due to new main window */
//Initialise the window frames first and than refresh text line array initFramesRel();
initFramesAndTextArray();
} }
void CTextBox::initFramesRel(void) void CTextBox::initFramesRel(void)
@@ -571,8 +569,8 @@ bool CTextBox::setText(const std::string* newText, int _max_width)
m_cText = *newText; m_cText = *newText;
//m_cText = *newText + "\n"; //FIXME test //m_cText = *newText + "\n"; //FIXME test
reSizeMainFrameHeight(m_cFrame.iHeight); reSizeMainFrameHeight(m_cFrame.iHeight);
//Initialise the window frames first and than refresh text line array //refresh text line array
initFramesAndTextArray(); refreshTextLineArray();
refresh(); refresh();
result = true; result = true;
} }