[Scummvm-git-logs] scummvm master -> 29f3e570c3010e74c4d38cbb319497da69652bc0

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:
29f3e570c3 GUI: Fix editing of colored string in List. Bug #13541


Commit: 29f3e570c3010e74c4d38cbb319497da69652bc0
    https://github.com/scummvm/scummvm/commit/29f3e570c3010e74c4d38cbb319497da69652bc0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-09T19:16:36+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