fix segfaulting when new text is smaller than the oldtext,
m_start_pos has to be 0 before calculating anything else.
This commit is contained in:
parent
c7baeb1ae2
commit
33d90f7a5e
1 changed files with 1 additions and 0 deletions
|
@ -69,6 +69,7 @@ TextBox::~TextBox() {
|
|||
|
||||
void TextBox::setText(const std::string &text) {
|
||||
m_text = text;
|
||||
m_start_pos = 0;
|
||||
cursorEnd();
|
||||
adjustStartPos();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue