fix: fix content selector for custom fields#7508
Conversation
|
Thanks for your contribution! Very much appreciated. You are already on the right track. However, instead of changing to display the field name. This would also improve the display of standard fields, e.g. Keyword instead of KEYWORD.
|
|
@tobiasdiez Thanks for your reviewing. Currently I get no idea on how to use getDisplayName() without any changes on toString(). Is there any other method to approach it? Thanks! |
|
The code says implicitly "please use toString" to render the Field. You can change this behavior by using a custom cell factory as its done for example here:
jabref/src/main/java/org/jabref/gui/preferences/preview/PreviewTab.java Lines 120 to 122 in 5a11412 |
|
Thanks for your guidance! |
|
I finished the behavior you mentioned above. Now the program can show display name without faults occurring in debug. |
tobiasdiez
left a comment
There was a problem hiding this comment.
Looks good to me. Again, thanks a lot for your contribution!
|
You are welcome! |
|
Thanks a lot for your contribution! |
We Fix the issue that Content selector does not seem to work for custom fields. This issue actually do not affect the correctness of running and just show a ugly output in the frontend. So I simply change the 'toString()' method in UnkownField class. This method do not make any effect to other functions but the user interface shown in the issue.
fixes #6819
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)