1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

bug in file transfer widget displaying fix

This commit is contained in:
apprb 2014-10-07 19:20:53 +09:00
parent 1fdc98873b
commit 57c7734c48

View File

@ -25,8 +25,8 @@
ChatAreaWidget::ChatAreaWidget(QWidget *parent)
: QTextBrowser(parent)
, nameWidth(75)
, tableFrmt(nullptr)
, nameWidth(75)
{
setReadOnly(true);
viewport()->setCursor(Qt::ArrowCursor);
@ -104,7 +104,7 @@ void ChatAreaWidget::insertMessage(ChatAction *msgAction)
checkSlider();
QTextTable *chatTextTable = getMsgTable();
QTextCursor cur = chatTextTable->cellAt(0, 1).firstCursorPosition();
QTextCursor cur = chatTextTable->cellAt(0, 2).firstCursorPosition();
cur.clearSelection();
cur.setKeepPositionOnInsert(true);
chatTextTable->cellAt(0, 0).firstCursorPosition().setBlockFormat(nameFormat);
@ -145,7 +145,9 @@ QTextTable *ChatAreaWidget::getMsgTable()
QTextLength(QTextLength::VariableLength,0)});
}
QTextTable *chatTextTable = textCursor().insertTable(1, 5, *tableFrmt);
QTextCursor tc = textCursor();
tc.movePosition(QTextCursor::End);
QTextTable *chatTextTable = tc.insertTable(1, 5, *tableFrmt);
return chatTextTable;
}