Closed JoshuaBonn1 closed 6 years ago
An extension of 1: If the user doesn't have local preferences, then the preferences tag in the workspace xml will not be there. If the user switches from local to global and clicks "Apply/OK", then the workspace xml is saved and the preferences are removed. They would also be removed from Workspace::localPreferences (i.e. synced back up to the current global preferences).
I'm thinking whatever is used for this should also be extended to handle any QDockWidget states (e.g. Timeline, Navigator, Palettes, Inspector, etc.)
Or, for the extra QDockWidgets, we could entertain the idea you mentioned of a snapshot of the current items and save that, but I still think loading should be about the same if they don't want it to change when switching between workspaces.
Current: Upon creation of a workspace, the current GUI preferences are saved to the workspace with a "useCustom=false" attribute. It also loads the GUI preferences into Workspace::localPreferences. In prefsdialog, there is a checkbox that will switch between local and global. Toggling it will change the current preferences in prefsdialog to the other preferences (local -> global or global -> local). Upon the time of workspace save (should be switched to after closing preferences), the "useCustom" tag should be the status of the checkbox. If the user switches to a workspace with "useCustom=true" then it automatically switches to the local preferences.
Issue: If the user switches from local -> global, then the local will clear from the workspace eventually. It's not specifically defined yet. Also, depending on when a save happens, if the user turns on local preferences on a workspace that has never had local preferences, it will load in old preferences.
Solutions:
These solutions are just ideas. I like 1, but 2 and 3 have some good features.