Skip to content

Commit

Permalink
parse error freeze (#2106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jürgen Lange authored and lenhard committed Oct 3, 2016
1 parent 565676c commit 3456255
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- Fixed file menu displays wrong hotkey in the German translation
- Fixed [#2090](https://github.com/JabRef/jabref/issues/#2090): If special fields were not selected, two menu item separator were shown
- Fixed [#2064](https://github.com/JabRef/jabref/issues/2064): Not all `other fields` are shown on entry change of same type
- Fixed [#2104](https://github.com/JabRef/jabref/issues/#2104): Crash after saving BibTeX source with parsing error


### Removed
- Removed 2nd preview style
Expand Down
16 changes: 9 additions & 7 deletions src/main/java/net/sf/jabref/gui/entryeditor/EntryEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -864,13 +864,15 @@ private boolean storeSource() {

Object[] options = {Localization.lang("Edit"), Localization.lang("Revert to original source")};

int answer = JOptionPane.showOptionDialog(frame, Localization.lang("Error") + ": " + ex.getMessage(),
Localization.lang("Problem with parsing entry"), JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, options, options[0]);

if (answer != 0) {
updateSource = true;
updateSource();
if (!SwingUtilities.isEventDispatchThread()) {
int answer = JOptionPane.showOptionDialog(frame, Localization.lang("Error") + ": " + ex.getMessage(),
Localization.lang("Problem with parsing entry"), JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, options, options[0]);

if (answer != 0) {
updateSource = true;
updateSource();
}
}

LOGGER.debug("Incorrect source", ex);
Expand Down

0 comments on commit 3456255

Please sign in to comment.