Skip to content
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 preview settings not saved due to l10n #7077

Merged
merged 2 commits into from
Nov 6, 2020
Merged

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Nov 5, 2020

Introduce internal name for finding layout
Fixes #6447

The problem was that the getName method returned a l10n name for Custom Preview layout.....

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

Introduce internal name for finding layout
Fixes #6447
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 5, 2020
Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question and one suggestion. 😃

Comment on lines +94 to +95
var currentLayout = getCurrentLayout();
if (currentLayout instanceof TextBasedPreviewLayout) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does patternmatching with instanceof already work?

            if (getCurrentLayout() instanceof TextBasedPreviewLayout currentLayout) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately in jdk14 it's still a preview feature.

@Siedlerchr Siedlerchr merged commit 2f27dd3 into master Nov 6, 2020
@Siedlerchr Siedlerchr deleted the fixPreviewStyleSaving branch November 6, 2020 08:36
Siedlerchr added a commit to JabRef/jabref-koppor that referenced this pull request Nov 11, 2020
* upstream/master: (164 commits)
  Bump lucene-queryparser from 8.6.3 to 8.7.0 (JabRef#7089)
  Fix endnote importer when keyword style is null (JabRef#7084)
  Rename Firefox extension file in Windows (JabRef#7092)
  Add support for Microsoft Edge browser in Windows and Linux builds (JabRef#7056)
  Bump unirest-java from 3.11.03 to 3.11.05 (JabRef#7087)
  Bump com.github.ben-manes.versions from 0.33.0 to 0.36.0 (JabRef#7088)
  Bump gittools/actions from v0.9.4 to v0.9.5 (JabRef#7091)
  Feature/add abstract field to complex search (JabRef#7079)
  Add missing authors
  Implement Emacs key bindings (JabRef#6037)
  Special field code maintenance (JabRef#7078)
  Follow up fix for 7077 Reset preview layouts on clear
  Fix preview settings not saved due to l10n (JabRef#7077)
  Add link to existing documentation of filed types
  Remove unused supportsPaging
  Squashed 'src/main/resources/csl-styles/' changes from 5c376b8..f4399aa
  Fix more 404 links
  Fix custom theme styles not applied to the entry preview (JabRef#7071)
  Fix Shared Database Tests (JabRef#7040)
  Bump byte-buddy-parent from 1.10.17 to 1.10.18 (JabRef#7059)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/DefaultInjector.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes in entry preview are not saved
2 participants