fix: crash when create project
This commit is contained in:
parent
f348f0782a
commit
a42ec4e253
|
@ -1138,6 +1138,13 @@ void MainWindow::updateClassBrowserForEditor(Editor *editor)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (editor->inProject() && !mProject) {
|
||||||
|
//project is in creation
|
||||||
|
mClassBrowserModel.setCurrentFile(editor->filename());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
mClassBrowserModel.beginUpdate();
|
mClassBrowserModel.beginUpdate();
|
||||||
mClassBrowserModel.setParser(editor->parser());
|
mClassBrowserModel.setParser(editor->parser());
|
||||||
if (editor->inProject()) {
|
if (editor->inProject()) {
|
||||||
|
@ -6197,6 +6204,8 @@ void MainWindow::on_actionNew_Project_triggered()
|
||||||
mProject->saveAll();
|
mProject->saveAll();
|
||||||
updateProjectView();
|
updateProjectView();
|
||||||
scanActiveProject(true);
|
scanActiveProject(true);
|
||||||
|
Editor* editor = mEditorList->getEditor();
|
||||||
|
updateClassBrowserForEditor(editor);
|
||||||
}
|
}
|
||||||
pSettings->ui().setNewProjectDialogWidth(dialog.width());
|
pSettings->ui().setNewProjectDialogWidth(dialog.width());
|
||||||
pSettings->ui().setNewProjectDialogHeight(dialog.height());
|
pSettings->ui().setNewProjectDialogHeight(dialog.height());
|
||||||
|
|
Loading…
Reference in New Issue