Comment 1 for bug 1031805

Revision history for this message
Aija (ajaunteva) wrote :

The reason why it happens lies in these lines:

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.