Skip to content

Commit

Permalink
Fix character print order may go wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
mhtvsSFrpHdE committed Aug 27, 2022
1 parent 16618eb commit 172e510
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qpp/prefetch/Source/Interface/MainWindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ void MainWindow::start()

void MainWindow::print_slot(QString textToPrint)
{
// Make sure text is inserted after last character
// User may copy text to clipboard, so cursor position is changed
auto cursor = ui->stdOut_plainTextEdit->textCursor();
cursor.movePosition(QTextCursor::End);
ui->stdOut_plainTextEdit->setTextCursor(cursor);

ui->stdOut_plainTextEdit->insertPlainText(textToPrint);
}

Expand Down

0 comments on commit 172e510

Please sign in to comment.