-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Library is marked as unsaved (*) after accepting changes from the file #11027
Comments
Is it because of an asterisk or another library changed dialog? If the latter, which content? |
It is because the asterisk appears on the library tab, and trying to close the tab or the program prompts you to save it. |
@koppor can I work on this? I went through the code and I'm thinking of making it save the library when Accept button is clicked in review changes page. |
Please remember to test manually and also think about UI tests. |
As a general advice for newcomers: check out Contributing for a start. Also, guidelines for setting up a local workspace is worth having a look at. Feel free to ask here at GitHub, if you have any issue related questions. If you have questions about how to setup your workspace use JabRef's Gitter chat. Try to open a (draft) pull-request early on, so that people can see you are working on the issue and so that they can see the direction the pull request is heading towards. This way, you will likely receive valuable feedback. |
A note about making it save automatically:
(Note that these points I'm raising might not be a problem after all, just trying to point out things I have found previously that could be problematic so maintainers can evaluate) |
@ror3d Your initial question was about to remove the asterisk if all external changes were applied. Not to remove it, if there is a mix of accepted and rejected changes? Then, the asterisk should stay (if the user has autosave disabled) |
Yes, precisely. I have autosave turned off (because we share the file in a shared drive among a couple of people) so as you say, if the issue was just saving after, that wouldn't be a problem. |
@amrithdas Thank you for the follow up. I commented at the PR. Current JabRef behavior:
Dialog closes and NO asterisk: I think, the logic is just inversed in JabRef. One "just" needs to find the place. |
@koppor upon further inspection I found that when accepting external changes JabRef is creating a new entry to the database even though its inserting the same data in the disk hence the changedProperty gets set to True. thats why its appearing as unsaved. similarly when denying its just removes the selected change. the logic is inversed as you mentioned but I'm not sure whether this will be a small change. would it be better to try finding a new approach or continue to refine the logic which I already did? |
@amrithdas I think, it is a completely new approach! Maybe, test cases can also be crafted. |
@koppor I have updated the PR, please review. |
@amrithdas Updates on the PR have more todo with the PR than with the issue. Hard to navigate from the issue to the PR on mobile... If you insist on pinging, please do that on tbe PR... |
JabRef version
Latest development branch build (please note build date below)
Operating system
Windows
Details on version and operating system
Windows 11
Checked with the latest development build (copy version output from About dialog)
Steps to reproduce the behaviour
This is visible when someone edits the file with jabref while you have the same library open. I don't know of a good way to reproduce other than that, maybe by editing the file in a text editor, or having two instances of jabref open (I don't know if easily done).
Appendix
No response
The text was updated successfully, but these errors were encountered: