Hide non-active documents when project manually chosen#1114
Merged
Hide non-active documents when project manually chosen#1114
Conversation
* Reassociate project and document on restore hiddin
* Close documents as well * Inform DocumentManager
# Conflicts fixed in: # src/FolderManager/FileView.vala
Closed
added 2 commits
August 31, 2022 12:22
# Conflicts fixed in: # src/FolderManager/FileView.vala
Member
|
I haven't looked at the code, but I am in favor of this behavior change! |
Closed
zeebok
approved these changes
Oct 22, 2022
Contributor
zeebok
left a comment
There was a problem hiding this comment.
Code looks good. I haven't tested yet but if you've tested enough to feel confident I say go ahead and merge it in
Collaborator
Author
|
I havent stress tested with hundreds of hidden and open docs but it seems stable under modest workload at least. Let others hammer it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This attempts to make handling multiple projects more convenient. I often find it annoying to have to manually close all the documents from one project when I want to switch to another project (but keep the first project available in the sidebar). Otherwise there can be a plethora of tabs open.
This PR arranges for all the documents of inactive projects to be closed (but remembered) when the active project is changed manually with the project chooser button. When the active project changes automatically by switching documents then all documents are kept open so it is still possible to work on two documents from different projects if required.
Also any document that is closed temporarily by this PR is still saved and restored.
Need to use this PR for a while to see how useful it is and whether there are drawbacks.