mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 07:30:56 +00:00
GUI: Fix editing of colored string in List. Bug #13541
This commit is contained in:
parent
fe2f37a4b6
commit
29f3e570c3
@ -667,7 +667,7 @@ void ListWidget::scrollToEnd() {
|
||||
void ListWidget::startEditMode() {
|
||||
if (_editable && !_editMode && _selectedItem >= 0) {
|
||||
_editMode = true;
|
||||
setEditString(_list[_selectedItem]);
|
||||
setEditString(stripGUIformatting(_list[_selectedItem]));
|
||||
_caretPos = _editString.size(); // Force caret to the *end* of the selection.
|
||||
_editColor = ThemeEngine::kFontColorNormal;
|
||||
markAsDirty();
|
||||
@ -918,7 +918,7 @@ void ListWidget::drawFormattedText(const Common::Rect &r, const Common::U32Strin
|
||||
}
|
||||
}
|
||||
|
||||
if (chunk.size())
|
||||
if (chunk.size() || str.empty())
|
||||
g_gui.theme()->drawText(r, chunk, state, align, inverted, deltax, true, curfont, curcolor);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user