mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-03-21 17:55:21 -05:00
[ChatView] Fix game log first line incorrect background color (#6612)
This commit is contained in:
parent
6ab558dd58
commit
189f3a7bbc
|
|
@ -75,8 +75,14 @@ void ChatView::adjustColorsToPalette()
|
|||
void ChatView::refreshBlockColors()
|
||||
{
|
||||
QTextDocument *doc = document();
|
||||
QTextCursor cursor(doc);
|
||||
|
||||
// Empty QTextDocuments still have 1 block, so we need handle this edge case
|
||||
if (doc->isEmpty()) {
|
||||
evenNumber = true;
|
||||
return;
|
||||
}
|
||||
|
||||
QTextCursor cursor(doc);
|
||||
bool even = true; // start fresh
|
||||
|
||||
for (QTextBlock block = doc->begin(); block.isValid(); block = block.next()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user