-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix change detection when adding files to a sketch #4849
Conversation
Change Detector now differentiates between a merge conflict (same file changed; will load the external changes if accepted by user; discards editor content) or a non-conflicting change (will load the external changes if accepted by user; nothing is lost).
e8951fb
to
292c479
Compare
@JakubValtar Can you review this? You were last in the change detection code… |
@benfry Yes, sure thing. |
@GKFX I like your idea and it works as expected, I just think the dialogs are way too complicated and as a user I'm really confused. This makes my brain melt :) @benfry How do you think this should work? It's more of a design problem. Current approach is to either
Problem is when you have modified tabs and you change one file externally, you either have to scrap changes in all tabs and reload the sketch, or ignore the external changes. The approach proposed in this PR is to detect tabs which were modified by external program (timestamp changed), and either
The idea is good because if you modify something externally, you probably want to reload just that and keep other tabs intact. The problem is that we have to save all other tabs in order to reload only one file, and it's really hard to explain what is going on. I think to address the problem we should rather write code to reload separate tabs and show one dialog per tab (like other editors):
|
That sounds right with minor changes:
|
@benfry Sounds good, I will implement if you guys haven't done it already. |
@GKFX Thank you, we're looking forward to it! |
Just to say that while I've left this inactive for a while, I am working on it again now. |
@GKFX Thanks, let us know when it's ready for review! |
@benfry I've sent a new PR. |
Ok, thanks! Closing this one. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Change Detector now differentiates between a merge conflict (same file changed; will load the external changes if accepted by user; discards editor content) or a non-conflicting change (will load the external changes if accepted by user; nothing is lost). This is done per file so that if one tab does conflict and the next doesn't, the non-conflicting tab is not discarded for no reason.
Fixes #4713.