- reworked the offer to save a project so it is done only if there are objects in the project but those objects are new and/or are modified since last project load (if an old project was loaded.)

This commit is contained in:
Marius Stanciu
2019-02-16 00:29:54 +02:00
committed by Marius S
parent e717cb8f15
commit 367d6f3155
4 changed files with 44 additions and 30 deletions

View File

@@ -679,6 +679,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
if group.child_count() is 1:
self.view.setExpanded(group_index, True)
self.app.should_we_save = True
# decide if to show or hide the Notebook side of the screen
if self.app.defaults["global_project_autohide"] is True:
# always open the notebook on object added to collection
@@ -776,6 +778,8 @@ class ObjectCollection(QtCore.QAbstractItemModel):
# always go to the Project Tab after object deletion as it may be done with a shortcut key
self.app.ui.notebook.setCurrentWidget(self.app.ui.project_tab)
self.app.should_we_save = True
# decide if to show or hide the Notebook side of the screen
if self.app.defaults["global_project_autohide"] is True:
# hide the notebook if there are no objects in the collection