summaryrefslogtreecommitdiffstats
path: root/pica-client/chatwindow.cpp
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-08-26 18:38:26 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2012-08-26 18:38:26 +0000
commit8c0d234322bf464b0c47662227f93e62b184a1e9 (patch)
treed70008c406da893b8b4c97d7e57dd864a4fabed2 /pica-client/chatwindow.cpp
parentb799878325caf474bc20f832df6a124781d0c205 (diff)
downloadpica-pica-8c0d234322bf464b0c47662227f93e62b184a1e9.tar.gz
pica-pica-8c0d234322bf464b0c47662227f93e62b184a1e9.zip
bugfix (bugzilla #3). Submitted by Daniil Ustinov
git-svn-id: svn://localhost/project_picapica/trunk@188 fb96df88-216d-11de-830c-f3023f12d8ac
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)
+