summaryrefslogtreecommitdiffstats
path: root/pica-client/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pica-client/chatwindow.cpp')
-rw-r--r--pica-client/chatwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/pica-client/chatwindow.cpp b/pica-client/chatwindow.cpp
index dd495ae..7273c08 100644
--- a/pica-client/chatwindow.cpp
+++ b/pica-client/chatwindow.cpp
@@ -47,12 +47,11 @@ void ChatWindow::put_message(QString msg, quint32 id, bool is_me)
color = "#ff0000";
QTextCursor c(chatw->document());
-
c.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
-
if (is_me)
undelivered_msgs.append(c.position());
+ chatw->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
fmt = chatw->currentCharFormat();
chatw->insertHtml(
QString("<b><font color=%1>&nbsp;(%2) %3 : </font></b>").
@@ -63,7 +62,7 @@ void ChatWindow::put_message(QString msg, quint32 id, bool is_me)
chatw->setCurrentCharFormat(fmt);
chatw->insertPlainText(msg + '\n');
- chatw->moveCursor(QTextCursor::End, QTextCursor::KeepAnchor);
+ chatw->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
}
void ChatWindow::msg_from_peer(QString msg)
@@ -138,3 +137,4 @@ void TextSend::keyPressEvent(QKeyEvent *e)
+