[Scummvm-git-logs] scummvm branch-2-6 -> dac4ba3e1d9df0204684006132ae19ad855e16e9
sev-
noreply at scummvm.org
Thu Jun 9 17:17:38 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dac4ba3e1d GUI: Fix editing of colored string in List. Bug #13541
Commit: dac4ba3e1d9df0204684006132ae19ad855e16e9
https://github.com/scummvm/scummvm/commit/dac4ba3e1d9df0204684006132ae19ad855e16e9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-09T19:17:28+02:00
Commit Message:
GUI: Fix editing of colored string in List. Bug #13541
Changed paths:
gui/widgets/list.cpp
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index cc047f0a29e..3e38c38fe64 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -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);
}
More information about the Scummvm-git-logs
mailing list