-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store and restore active-project-path explicitly #1472
base: master
Are you sure you want to change the base?
Conversation
* Sync with GitManager and ProjectChooserButton
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is actually worse because the project isn't updating when I switch project files, so project-wide search will continue to search in the old selection instead of the project that relates to the open files
@danirabbit Hmm, OK. I was trying to make the "active project" more stable and avoid conflict between what the terminal build directory is and what the active project is. May have to rethink the global search. It is not clear what to do if the user opens documents in more than one project at a time. I guess the search should be done in the project associated with the currently focussed document? I am reluctant to have the active project keep switching depending on which document is focussed! The active project, in my mind, is the one that is being developed and built. Agreed you might want to have documents from other projects open for reference but that does not change the focus of development. |
@danirabbit I have tried to address your concerns by decoupling the "active project path" from the "global search path". The main issue now is whether you want to be able to have different active projects in different windows. This could be useful I guess but would require having separate GitManager instances for each window. Only one of the window would be restorable at the moment. |
Converting to draft while fixing a bug in choosing active projects with same beginning of name. |
Fixes #1471
The interface no longer tries to second-guess the active project based on user actions except for selecting (or reselecting) the active project through the chooser.
Global search continues to be carried out in the selected document's project (if it exists), falling back to the active project and ultimately the document itself.
Other actions that use the default action target like "New Branch" will now use the active project as shown in the ProjectChooserButton (and terminal path) regardless of which document is focussed when invoked with the keyboard. These action invoked with a folder context menu will target that folder regardless of the active project. This behaviour can be revisited if required.
Another side effect of this is that the active project is synchronised across open windows. May have to store active project on a per window basis?