Merge pull request #45 from PhenomRetroShare/Fix_ChatWidgetLastCursorFormatting

Fix chat widget last cursor formatting
This commit is contained in:
Cyril Soler 2015-08-26 19:31:50 -04:00
commit 6ba2f68cb5

View File

@ -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()) {