From 8c0d234322bf464b0c47662227f93e62b184a1e9 Mon Sep 17 00:00:00 2001 From: me_desk Date: Sun, 26 Aug 2012 18:38:26 +0000 Subject: bugfix (bugzilla #3). Submitted by Daniil Ustinov git-svn-id: svn://localhost/project_picapica/trunk@188 fb96df88-216d-11de-830c-f3023f12d8ac --- pica-client/chatwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pica-client/chatwindow.cpp') 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(" (%2) %3 : "). @@ -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) + -- cgit v1.2.1