mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-07 15:32:13 +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)
|
void NewFileDialog::loadFile(const QString &filename)
|
||||||
{
|
{
|
||||||
if (!Core()->tryFile(filename, false)) {
|
if (!ui->checkBox_FilelessOpen->isChecked() && !Core()->tryFile(filename, false)) {
|
||||||
QMessageBox msgBox(this);
|
QMessageBox msgBox(this);
|
||||||
msgBox.setText(tr("Select a new program or a previous one before continuing."));
|
msgBox.setText(tr("Select a new program or a previous one before continuing."));
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
@ -293,7 +293,7 @@ void NewFileDialog::loadFile(const QString &filename)
|
|||||||
// Close dialog and open MainWindow/OptionsDialog
|
// Close dialog and open MainWindow/OptionsDialog
|
||||||
MainWindow *main = new MainWindow();
|
MainWindow *main = new MainWindow();
|
||||||
main->openNewFile(filename);
|
main->openNewFile(filename);
|
||||||
|
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
src/dialogs/NewfileDialog.ui
Normal file → Executable file
7
src/dialogs/NewfileDialog.ui
Normal file → Executable file
@ -274,6 +274,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox_FilelessOpen">
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't open any file</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="loadFileButton">
|
<widget class="QPushButton" name="loadFileButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
Reference in New Issue
Block a user