mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-10-08 00:00:29 -04:00
Improve handling of country/prefix information appended to decoded CQ messages
The use of QTextEdit::toPlainText() converts non-break spaces to normal spaces so was breaking the use of that character to delineate appended info. Since using QTextEdit::toPlainText() is an unnecessary operation as the decoded text can be more amenably accessed through the QDocument and QTextBlock interface without any translation, this is an improvement which should have some performance impact when many decodes are stored in the decodes windows.
This commit is contained in:
@@ -76,6 +76,7 @@ void DisplayText::insertLineSpacer(QString const& line)
|
||||
void DisplayText::appendText(QString const& text, QColor bg,
|
||||
QString const& call1, QString const& call2)
|
||||
{
|
||||
qDebug () << "DisplayText::appendText: text:" << text << "Nbsp pos:" << text.indexOf (QChar::Nbsp);
|
||||
auto cursor = textCursor ();
|
||||
cursor.movePosition (QTextCursor::End);
|
||||
auto block_format = cursor.blockFormat ();
|
||||
|
||||
Reference in New Issue
Block a user