mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fix ChatWidget last cursor formatting.
To test it, search a text that will be colored a end. New messages lose their format.
This commit is contained in:
parent
eb4313fef2
commit
326a33059d
@ -888,7 +888,9 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
|
||||
|
||||
formatMsg.prepend(QString("<a name=\"%1_%2\"/>").arg(timeStamp).arg(name));
|
||||
//To call this anchor do: ui->textBrowser->scrollToAnchor(QString("%1_%2").arg(timeStamp).arg(name));
|
||||
ui->textBrowser->textCursor().setBlockFormat(QTextBlockFormat ());
|
||||
QTextCursor textCursor = QTextCursor(ui->textBrowser->textCursor());
|
||||
textCursor.movePosition(QTextCursor::End);
|
||||
textCursor.setBlockFormat(QTextBlockFormat ());
|
||||
ui->textBrowser->append(formatMsg);
|
||||
|
||||
if (ui->leSearch->isVisible()) {
|
||||
|
Loading…
Reference in New Issue
Block a user