Revert "make editable text display from the beginning by default"

This reverts commit c2f9c070b7.

Causes corrupted frame counter in debugger (when counter > 256)
This commit is contained in:
thrust26 2018-06-21 22:55:01 +02:00
parent b78beab329
commit d387369e92
1 changed files with 5 additions and 1 deletions

View File

@ -55,7 +55,11 @@ void EditableWidget::setText(const string& str, bool)
if(_filter(tolower(c)))
_editString.push_back(c);
_caretPos = _editScrollOffset = 0;
_caretPos = int(_editString.size());
_editScrollOffset = (_font.getStringWidth(_editString) - (getEditRect().width()));
if (_editScrollOffset < 0)
_editScrollOffset = 0;
setDirty();
}