mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +00:00
Auto scroll in console output
Add auto scroll in console output textedit, the scroll will jump to end after appending data
This commit is contained in:
parent
32d24315b3
commit
23899aac5c
@ -723,6 +723,7 @@ void MainWindow::on_consoleInputLineEdit_returnPressed()
|
|||||||
if (this->core) {
|
if (this->core) {
|
||||||
QString input = ui->consoleInputLineEdit->text();
|
QString input = ui->consoleInputLineEdit->text();
|
||||||
ui->consoleOutputTextEdit->appendPlainText(this->core->cmd(input));
|
ui->consoleOutputTextEdit->appendPlainText(this->core->cmd(input));
|
||||||
|
ui->consoleOutputTextEdit->verticalScrollBar()->setValue(ui->consoleOutputTextEdit->verticalScrollBar()->maximum());
|
||||||
// Add new command to history
|
// Add new command to history
|
||||||
QCompleter *completer = ui->consoleInputLineEdit->completer();
|
QCompleter *completer = ui->consoleInputLineEdit->completer();
|
||||||
/*
|
/*
|
||||||
@ -947,11 +948,13 @@ void MainWindow::get_refs(const QString& offset)
|
|||||||
void MainWindow::add_output(QString msg)
|
void MainWindow::add_output(QString msg)
|
||||||
{
|
{
|
||||||
ui->consoleOutputTextEdit->appendPlainText(msg);
|
ui->consoleOutputTextEdit->appendPlainText(msg);
|
||||||
|
ui->consoleOutputTextEdit->verticalScrollBar()->setValue(ui->consoleOutputTextEdit->verticalScrollBar()->maximum());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::add_debug_output(QString msg)
|
void MainWindow::add_debug_output(QString msg)
|
||||||
{
|
{
|
||||||
ui->consoleOutputTextEdit->appendHtml("<font color=\"red\"> [DEBUG]:\t" + msg + "</font>");
|
ui->consoleOutputTextEdit->appendHtml("<font color=\"red\"> [DEBUG]:\t" + msg + "</font>");
|
||||||
|
ui->consoleOutputTextEdit->verticalScrollBar()->setValue(ui->consoleOutputTextEdit->verticalScrollBar()->maximum());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionNew_triggered()
|
void MainWindow::on_actionNew_triggered()
|
||||||
|
Loading…
Reference in New Issue
Block a user