mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 04:46:11 +00:00
Fix Companion Script
This commit is contained in:
parent
d510897ad1
commit
ec2807a897
@ -314,14 +314,13 @@ void MainWindow::openNewFile(InitialOptions options, bool skipOptionsDialog)
|
|||||||
/* Prompt to load filename.r2 script */
|
/* Prompt to load filename.r2 script */
|
||||||
if (options.script.isEmpty()) {
|
if (options.script.isEmpty()) {
|
||||||
QString script = QString("%1.r2").arg(this->filename);
|
QString script = QString("%1.r2").arg(this->filename);
|
||||||
QString loadScript;
|
|
||||||
if (r_file_exists(script.toStdString().data())) {
|
if (r_file_exists(script.toStdString().data())) {
|
||||||
QMessageBox mb;
|
QMessageBox mb;
|
||||||
mb.setWindowTitle(tr("Script loading"));
|
mb.setWindowTitle(tr("Script loading"));
|
||||||
mb.setText(tr("Do you want to load the '%1' script?").arg(script));
|
mb.setText(tr("Do you want to load the '%1' script?").arg(script));
|
||||||
mb.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
mb.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
|
||||||
if (mb.exec() == QMessageBox::Yes) {
|
if (mb.exec() == QMessageBox::Yes) {
|
||||||
loadScript = script;
|
options.script = script;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user