diff options
| author | Cerapter <cerap@protonmail.com> | 2018-08-14 21:26:30 +0200 |
|---|---|---|
| committer | Cerapter <cerap@protonmail.com> | 2018-08-14 21:26:30 +0200 |
| commit | b25b8019f03464d8dac0e8796aeee73cf6c45600 (patch) | |
| tree | f76b207cdda6fb7eb809923ad6307746b34d3a98 | |
| parent | af4a62b65d07d9afff137d55906e38cef6356300 (diff) | |
Fixed a minor linebreak bug in the IC chatlog.
| -rw-r--r-- | courtroom.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/courtroom.cpp b/courtroom.cpp index 293b39d5..717ee9db 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -1507,8 +1507,7 @@ void Courtroom::append_ic_songchange(QString p_songname, QString p_name) } ui_ic_chatlog->textCursor().insertText(" has played a song: ", normal); - ui_ic_chatlog->textCursor().insertText(p_songname, italics); - ui_ic_chatlog->textCursor().insertText(".", normal); + ui_ic_chatlog->textCursor().insertText(p_songname + "." + '\n', italics); // If we got too many blocks in the current log, delete some from the top. while (ui_ic_chatlog->document()->blockCount() > log_maximum_blocks) @@ -1539,11 +1538,10 @@ void Courtroom::append_ic_songchange(QString p_songname, QString p_name) ui_ic_chatlog->moveCursor(QTextCursor::Start); - ui_ic_chatlog->textCursor().insertText(p_name, bold); + ui_ic_chatlog->textCursor().insertText('\n' + p_name, bold); ui_ic_chatlog->textCursor().insertText(" has played a song: ", normal); - ui_ic_chatlog->textCursor().insertText(p_songname, italics); - ui_ic_chatlog->textCursor().insertText(".", normal); + ui_ic_chatlog->textCursor().insertText(p_songname + ".", italics); // If we got too many blocks in the current log, delete some from the bottom. while (ui_ic_chatlog->document()->blockCount() > log_maximum_blocks) |
