-
-
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
Changing entry type does not always work when biblatex source is not shown #5906
Comments
It's only a display issue: if you change the entry type, save and reload the database the change is correctly reflected. |
@tobiasdiez On the one hand, I wanted to address the display issues (in the main table and in the tab "biblatex source", where in the source the entry type sometimes does not get updated), on the other hand, I think it is not only a display issue: Consider the following: Prerequisite: Make sure, that in Options -> Preferences -> Entry editor -> "Show BibTeX source by default" is NOT ticked.
Observation: The performed change (namely changing the entry type) has been overwritten to the previous entry type. This could indicate a reference issue as well. From my perspective, it seems, that the tab "biblatex source" still references to the previous entry (or the changes simply have not been written to the tab "biblatex source") and it "writes back" the contained values, since it is (and must be) quite sensitive to changes. |
@calixtus you recently fixed a bug and reused that code editor component. Maybe this is the issue now for the incorrect reference? That would explain why we did not reuse the control, but recreated every time |
Im going to investigate this tomorrow. |
I took a look into the code, it's two bugs: one thing is about the source tab, it easily fixed by adding an InvalidationListener to the typeProperty (fix incoming for issue #5905 ). The other one, this here, is about displaying the changed entry type in the main table. |
This bug here could be a simply consequence of the fact that |
I tried the simple fix idea from @tobiasdiez and added entryType to the observables. However, this has only an impact on the PreviewViewer. The observables are only used in the PrevieViewer. |
I think I found the problem: jabref/src/main/java/org/jabref/gui/maintable/FieldColumn.java Lines 51 to 52 in 6a9c915
only includes real fields as dependencies. jabref/src/main/java/org/jabref/model/entry/BibEntry.java Lines 917 to 920 in 6a9c915
The display still works as its done via
and this includes special handling of types jabref/src/main/java/org/jabref/model/entry/BibEntry.java Lines 249 to 251 in 6a9c915
Thus it should be possible to fix this issue by adding a special handling of the type field in jabref/src/main/java/org/jabref/model/entry/BibEntry.java Lines 917 to 920 in 6a9c915
|
Thanks for the hint, adding a check for the entry type in that binding works |
I can confirm, that all problems mentioned within this issue are fixed with this commit. :) One very related issue (where I hoped this would fix it as well) is still open: #5905 |
* Fix maintable not updated when changing entry type Fixes #5906 * fix checkstyle * use easybind with cast
I am using the latest JabRef 5 master build:
Java 13.0.2
on Ubuntu 16.04
The value of the entry type field for an entry in the main table is not updating when changing its type by using the dropdown menu of the entry editor. To differentiate this from issue #5905, one can assume, that in the entry editor the tab "biblatex source" is not/never active.
Steps to reproduce the behavior:
Observation: Commonly, the entry type will not change in the main table, even if shortly selecting a different entry in the main table and reselecting the edited one. Sometimes temporarily switching to a different opened library helps, but not always.
Contrarily, other fields in the main table will be updated immediately, when their values get changed.
Subsequent observation (now allows viewing the tab "biblatex source"):
Observation: The library has been modifed (indicated with the star symbol "*"), although no change was conduted.
For both cases, I assume it could be some reference problem.
The text was updated successfully, but these errors were encountered: