if self.project.CheckUnsavedChanges():
self.OnSaveProject()
self.project.CloseProject()
elif self.project.newly_created_project:
self.project.CloseProject()
ProjectManager.DeleteProjectLocation(self.project)
else:
self.project.CloseProject()
The project is deleted if it is newly_created_project. However, if this new project has unsaved changes then the first "if" passes and the project is saved and closed. If I press Save as described previously then CheckUnsavedChanges() is false and it goes to the next statement which is true (it still is a new project) and get the project deleted.
So, in Project.SaveIncrementalAction added self.newly_created_project = False, thus, after any changes that calls this function will turn project in "old".
Only projects that are "empty" (nothing is done there after opening) will be deleted.
If there are some actions that still result in deleted projects, then it is most likely that it lacks call to SaveIncrementalAction which might be an another bug.
The reason why it happens lies in these lines:
if self.project. CheckUnsavedCha nges(): ject() CloseProject( ) newly_created_ project: CloseProject( ) .DeleteProjectL ocation( self.project) CloseProject( )
self.OnSavePro
self.project.
elif self.project.
self.project.
ProjectManager
else:
self.project.
The project is deleted if it is newly_created_ project. However, if this new project has unsaved changes then the first "if" passes and the project is saved and closed. If I press Save as described previously then CheckUnsavedCha nges() is false and it goes to the next statement which is true (it still is a new project) and get the project deleted.
So, in Project. SaveIncremental Action added self.newly_ created_ project = False, thus, after any changes that calls this function will turn project in "old". Action which might be an another bug.
Only projects that are "empty" (nothing is done there after opening) will be deleted.
If there are some actions that still result in deleted projects, then it is most likely that it lacks call to SaveIncremental