You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening the application it attempts to load the previously loaded project in Editor.kt create()
// open last edited project or create default projectvar context:ProjectContext?= projectManager.loadLastProject()
if (context ==null) {
context = createDefaultProject()
}
if(context ==null) {
throwGdxRuntimeException("Couldn't open a project")
}
However if the previously opened project was deleted (or the .pro was corrupted) then the fallback is to create a default project only if the registry is empty or last project is null
privatefuncreateDefaultProject(): ProjectContext? {
if (registry.lastOpenedProject ==null|| registry.projects.size ==0) {
val name ="Default Project"var path =FileUtils.getUserDirectoryPath()
path =FilenameUtils.concat(path, "MundusProjects")
return projectManager.createProject(name, path)
}
returnnull
}
If the fallback occurs and the registry is not empty, a GdxRuntimeException is thrown. The solution may be to have a separate "Project Select" dialog in this situation to choose a project to open or create a new one. It would also be nice to have this dialogue for first time launching the application as well, instead of creating a default project.
The text was updated successfully, but these errors were encountered:
When opening the application it attempts to load the previously loaded project in Editor.kt create()
However if the previously opened project was deleted (or the .pro was corrupted) then the fallback is to create a default project only if the registry is empty or last project is null
If the fallback occurs and the registry is not empty, a GdxRuntimeException is thrown. The solution may be to have a separate "Project Select" dialog in this situation to choose a project to open or create a new one. It would also be nice to have this dialogue for first time launching the application as well, instead of creating a default project.
The text was updated successfully, but these errors were encountered: