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

Select newly added jstyle in table to prevent exception #5556

Merged
merged 1 commit into from
Nov 3, 2019

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Nov 2, 2019

Fixes #5452


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Manually tested changed features in running JabRef
  • Screenshots added in PR description (for bigger UI changes)
  • Ensured that the git commit message is a good one
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 2, 2019
@@ -129,4 +124,8 @@ public void storePrefs() {
preferences.setCurrentStyle(selectedItem.getValue().getStylePath());
preferencesService.setOpenOfficePreferences(preferences);
}

private StyleSelectItemViewModel getStyleOrDefault(String stylePath) {
return styles.stream().filter(style -> style.getStylePath().equals(stylePath)).findFirst().orElse(styles.get(0));
Copy link
Member

Choose a reason for hiding this comment

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

What happens if styles is empty?

Copy link
Member Author

Choose a reason for hiding this comment

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

Styles can never be empty because we have two internal default styles that are always available.

@tobiasdiez tobiasdiez merged commit f2e5bf2 into master Nov 3, 2019
@tobiasdiez tobiasdiez deleted the fixOoStyleSelection branch November 3, 2019 19:43
Siedlerchr added a commit that referenced this pull request Nov 5, 2019
* upstream/master: (116 commits)
  New translations JabRef_en.properties (French) (#5564)
  Select newly added jstyle in table to prevent exception (#5556)
  Make entry editor DND behave as specified in settings (#5554)
  Disabled Windows directory picker temporarily
  Disabled Windows directory picker temporarily
  Adding wix script to support jpackage update
  Making importing a single file easier (Issue #5508) (#5513)
  Fix #5551 - Don't remove unwanted characters before first author is selected (#5558)
  Update JabRef_it.properties
  New translations JabRef_en.properties (Vietnamese)
  New translations JabRef_en.properties (Dutch)
  New translations JabRef_en.properties (French)
  New translations JabRef_en.properties (German)
  New translations JabRef_en.properties (Greek)
  New translations JabRef_en.properties (Indonesian)
  New translations JabRef_en.properties (Italian)
  New translations JabRef_en.properties (Japanese)
  New translations JabRef_en.properties (Danish)
  New translations JabRef_en.properties (Norwegian)
  New translations JabRef_en.properties (Polish)
  ...
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.

Error in importing jstyles
3 participants