mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CTextBox: rework return control of value of setText() function
value was not clearly, hope i'ts now
This commit is contained in:
@@ -789,23 +789,26 @@ void CTextBox::refresh(void)
|
|||||||
bool CTextBox::setText(const std::string* newText, int max_width, bool force_repaint)
|
bool CTextBox::setText(const std::string* newText, int max_width, bool force_repaint)
|
||||||
{
|
{
|
||||||
//TRACE("[CTextBox]->SetText \r\n");
|
//TRACE("[CTextBox]->SetText \r\n");
|
||||||
bool result = false;
|
|
||||||
m_nMaxTextWidth = max_width;
|
m_nMaxTextWidth = max_width;
|
||||||
//reset text to force repaint the text, managed in hasChanged()
|
//reset text to force repaint the text, managed in hasChanged()
|
||||||
if (force_repaint)
|
if (force_repaint)
|
||||||
m_old_cText = "";
|
m_old_cText = "";
|
||||||
//printf("setText: _max_width %d max_width %d\n", _max_width, max_width);
|
//printf("setText: _max_width %d max_width %d\n", _max_width, max_width);
|
||||||
if (newText != NULL)
|
if (newText){
|
||||||
{
|
|
||||||
m_cText = *newText;
|
m_cText = *newText;
|
||||||
//m_cText = *newText + "\n"; //FIXME test
|
if (m_old_cText != m_cText){
|
||||||
reSizeMainFrameHeight(m_cFrame.iHeight);
|
//m_cText = *newText + "\n"; //FIXME test
|
||||||
//refresh text line array
|
reSizeMainFrameHeight(m_cFrame.iHeight);
|
||||||
refreshTextLineArray();
|
//refresh text line array
|
||||||
refresh();
|
refreshTextLineArray();
|
||||||
result = true;
|
refresh();
|
||||||
}
|
return true;
|
||||||
return(result);
|
}
|
||||||
|
return false;
|
||||||
|
}else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTextBox::paint (void)
|
void CTextBox::paint (void)
|
||||||
|
Reference in New Issue
Block a user