1
0
Fork 0

Previous edit to log view broke it -- if you clicked on the screen, text would insert there. movecursor is needed on both sides

This commit is contained in:
justin 2016-07-15 12:23:53 -06:00 committed by mrexodia
parent c5eee372dc
commit aa989d1b3c
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
1 changed files with 3 additions and 0 deletions

View File

@ -103,7 +103,10 @@ void LogView::addMsgToLogSlot(QString msg)
return;
if(this->document()->characterCount() > 10000 * 100) //limit the log to ~100mb
this->clear();
// This sets the cursor to the end for the next insert
this->moveCursor(QTextCursor::End);
this->insertPlainText(msg);
// This sets the cursor to the end to display the new text
this->moveCursor(QTextCursor::End);
}