From 1244af46662d0f02e5fba5b938561bfd3853b3f2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 20 Sep 2012 09:37:15 +0200 Subject: [PATCH] *CTextBox: fix freezes in channellist and bedit refreshTextLineArray() was to much in reSizeMainFrameHeight() and initFramesRel(), caused endless loops under certain circumstances --- src/gui/widget/textbox.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/gui/widget/textbox.cpp b/src/gui/widget/textbox.cpp index 9c4c9c108..e3a89aa01 100644 --- a/src/gui/widget/textbox.cpp +++ b/src/gui/widget/textbox.cpp @@ -228,8 +228,7 @@ void CTextBox::reSizeMainFrameWidth(int textWidth) m_cFrame.iWidth = iNewWindowWidth; /* Re-Init the children frames due to new main window */ - //Initialise the window frames first and than refresh text line array - initFramesAndTextArray(); + initFramesRel(); } void CTextBox::reSizeMainFrameHeight(int textHeight) @@ -247,8 +246,7 @@ void CTextBox::reSizeMainFrameHeight(int textHeight) m_cFrame.iHeight = iNewWindowHeight; /* Re-Init the children frames due to new main window */ - //Initialise the window frames first and than refresh text line array - initFramesAndTextArray(); + initFramesRel(); } void CTextBox::initFramesRel(void) @@ -571,8 +569,8 @@ bool CTextBox::setText(const std::string* newText, int _max_width) m_cText = *newText; //m_cText = *newText + "\n"; //FIXME test reSizeMainFrameHeight(m_cFrame.iHeight); - //Initialise the window frames first and than refresh text line array - initFramesAndTextArray(); + //refresh text line array + refreshTextLineArray(); refresh(); result = true; }