-
-
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
Export of Preferences: User generated Export filter are duplicated #10176
Comments
Can still reproduce this in the latest dev- |
Hi I am new to open-source contribution, and looking for some good-first-issues. May I try on this one? Thanks |
I am not sure if this is a good first issue. You can try to solve it, but if you feel like this is too hard for you or you are stuck, you probably should choose from our projects page "good first issues" instead: https://github.com/orgs/JabRef/projects/5 |
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. |
Sure thanks, I noticed that not only "Custom Export Formats", but "External file types" is also repeated. |
@calixtus Any idea what this might be? |
I just check the code, after preferences export, function PreferenceDialogViewModel.setValues() was called, which duplicated the items of the TableView. I think the setValues() shouldn't be called because no value changes in preferences. But I will investigate the code more deeply later. |
setValues should initialize/reset the Viewmodel when opening the app or to ensure that the right values are used. Simply clearing the representing list before inserting the values in setValues should fix that problem. |
yes but for preferences export function it wont impact the Viewmodel, so I suggest not to call setValues for that. |
for import preferences and reset preferences, same problem happened too. For these 2 cases I will follow @calixtus suggestion and clear the list before inserting the values again. |
setValues is called to ensure that the viewmodel is in sync with the backing preferencesService. So even it is not needed to call after export prefs, it should always work as expected! So please always call the clear function for the lists in the setValues method. |
Ok no problem will change nothing but just clear the list before refresh the values |
JabRef version
5.9 (latest release)
Operating system
Windows
Details on version and operating system
Win 10
Checked with the latest development build
Steps to reproduce the behaviour
20230722_170708.mp4
Appendix
...
Log File
The text was updated successfully, but these errors were encountered: