mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-23 21:35:28 +00:00
Update Seek from ConsoleWidget only if it has changed
This commit is contained in:
parent
5a03a07e1b
commit
bd82f2cf45
@ -175,9 +175,10 @@ void ConsoleWidget::executeCommand(const QString &command)
|
|||||||
});
|
});
|
||||||
|
|
||||||
QString cmd_line = "<br>[" + RAddressString(Core()->getOffset()) + "]> " + command + "<br>";
|
QString cmd_line = "<br>[" + RAddressString(Core()->getOffset()) + "]> " + command + "<br>";
|
||||||
|
RVA oldOffset = Core()->getOffset();
|
||||||
commandTask = QSharedPointer<CommandTask>(new CommandTask(command, CommandTask::ColorMode::MODE_256, true));
|
commandTask = QSharedPointer<CommandTask>(new CommandTask(command, CommandTask::ColorMode::MODE_256, true));
|
||||||
connect(commandTask.data(), &CommandTask::finished, this, [this, cmd_line,
|
connect(commandTask.data(), &CommandTask::finished, this, [this, cmd_line,
|
||||||
command, originalLines] (const QString & result) {
|
command, originalLines, oldOffset] (const QString & result) {
|
||||||
|
|
||||||
if (originalLines < ui->outputTextEdit->blockCount()) {
|
if (originalLines < ui->outputTextEdit->blockCount()) {
|
||||||
removeLastLine();
|
removeLastLine();
|
||||||
@ -188,7 +189,9 @@ void ConsoleWidget::executeCommand(const QString &command)
|
|||||||
commandTask = nullptr;
|
commandTask = nullptr;
|
||||||
ui->inputLineEdit->setEnabled(true);
|
ui->inputLineEdit->setEnabled(true);
|
||||||
ui->inputLineEdit->setFocus();
|
ui->inputLineEdit->setFocus();
|
||||||
Core()->updateSeek();
|
if (oldOffset != Core()->getOffset()) {
|
||||||
|
Core()->updateSeek();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
connect(commandTask.data(), &CommandTask::finished, timer, &QTimer::stop);
|
connect(commandTask.data(), &CommandTask::finished, timer, &QTimer::stop);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user