mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
Fix a crash and quitting accidentally
This commit is contained in:
parent
2aabec9d05
commit
3ee8c68a4a
@ -298,20 +298,20 @@ void NewFileDialog::loadFile(const QString &filename)
|
||||
|
||||
settings.setValue("recentFileList", files);
|
||||
|
||||
close();
|
||||
|
||||
// Close dialog and open MainWindow/OptionsDialog
|
||||
MainWindow *main = new MainWindow();
|
||||
main->openNewFile(filename);
|
||||
//OptionsDialog *o = new OptionsDialog(fname);
|
||||
//o->exec();
|
||||
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
void NewFileDialog::loadProject(const QString &project)
|
||||
{
|
||||
close();
|
||||
|
||||
MainWindow *main = new MainWindow();
|
||||
main->openProject(project);
|
||||
|
||||
close();
|
||||
}
|
||||
|
@ -79,7 +79,12 @@ void GraphicsBar::fillData()
|
||||
int to = mainMap["to"].toInt();
|
||||
int block = mainMap["blocksize"].toInt();
|
||||
int size = (to - from);
|
||||
int num = size / block;
|
||||
int num = 1;
|
||||
if (block != 0)
|
||||
{
|
||||
num = size / block;
|
||||
}
|
||||
|
||||
if (num < 1)
|
||||
{
|
||||
num = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user