mirror of https://github.com/stella-emu/stella.git
selection bug fix attempt
This commit is contained in:
parent
c894d8c080
commit
5fd48d8a99
|
@ -52,6 +52,7 @@ void EditableWidget::setText(const string& str, bool)
|
||||||
_editString.push_back(c);
|
_editString.push_back(c);
|
||||||
|
|
||||||
_caretPos = int(_editString.size());
|
_caretPos = int(_editString.size());
|
||||||
|
_selectSize = 0;
|
||||||
|
|
||||||
_editScrollOffset = (_font.getStringWidth(_editString) - (getEditRect().w()));
|
_editScrollOffset = (_font.getStringWidth(_editString) - (getEditRect().w()));
|
||||||
if (_editScrollOffset < 0)
|
if (_editScrollOffset < 0)
|
||||||
|
@ -101,6 +102,7 @@ bool EditableWidget::handleText(char text)
|
||||||
if(tryInsertChar(text, _caretPos))
|
if(tryInsertChar(text, _caretPos))
|
||||||
{
|
{
|
||||||
_caretPos++;
|
_caretPos++;
|
||||||
|
_selectSize = 0;
|
||||||
sendCommand(EditableWidget::kChangedCmd, 0, _id);
|
sendCommand(EditableWidget::kChangedCmd, 0, _id);
|
||||||
setDirty();
|
setDirty();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue