mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
* Allow to run Cutter without any file opened #404
This commit is contained in:
parent
152503a936
commit
0ecc0ed113
@ -273,7 +273,7 @@ bool NewFileDialog::fillProjectsList()
|
||||
|
||||
void NewFileDialog::loadFile(const QString &filename)
|
||||
{
|
||||
if (!Core()->tryFile(filename, false)) {
|
||||
if (!ui->checkBox_FilelessOpen->isChecked() && !Core()->tryFile(filename, false)) {
|
||||
QMessageBox msgBox(this);
|
||||
msgBox.setText(tr("Select a new program or a previous one before continuing."));
|
||||
msgBox.exec();
|
||||
@ -293,7 +293,7 @@ void NewFileDialog::loadFile(const QString &filename)
|
||||
// Close dialog and open MainWindow/OptionsDialog
|
||||
MainWindow *main = new MainWindow();
|
||||
main->openNewFile(filename);
|
||||
|
||||
|
||||
close();
|
||||
}
|
||||
|
||||
|
7
src/dialogs/NewfileDialog.ui
Normal file → Executable file
7
src/dialogs/NewfileDialog.ui
Normal file → Executable file
@ -274,6 +274,13 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_FilelessOpen">
|
||||
<property name="text">
|
||||
<string>Don't open any file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="loadFileButton">
|
||||
<property name="text">
|
||||
|
Loading…
Reference in New Issue
Block a user