Correct a flaw in setting QMAP background colors.

This commit is contained in:
Joe Taylor 2023-12-08 15:32:40 -05:00
parent 6019101018
commit 0cf01f1248

View File

@ -941,18 +941,24 @@ void MainWindow::guiUpdate()
t1="-";
ui->decodedTextBrowser->append(t1.repeated(56));
m_nline++;
QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1));
QTextBlockFormat f = cursor.blockFormat();
f.setBackground(QBrush(Qt::white));
cursor.setBlockFormat(f);
}
m_UTC0=t.left(4);
t=t.trimmed();
ui->decodedTextBrowser->append(t);
m_fetched++;
m_nline++;
QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1));
QTextBlockFormat f = cursor.blockFormat();
if(t.mid(36,2)=="30") {
QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1));
QTextBlockFormat f = cursor.blockFormat();
f.setBackground(QBrush(Qt::yellow));
cursor.setBlockFormat(f);
} else {
f.setBackground(QBrush(Qt::white));
}
cursor.setBlockFormat(f);
}
}
t1="";