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

unregister DateChangeListener in manual update method #2450

Merged
merged 1 commit into from
Jan 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
### Fixed
- The formatter for normalizing pages now also can treat ACM pages such as `2:1--2:33`.
- Backslashes in content selectors are now corretly escaped. Fixes [#2426](https://github.com/JabRef/jabref/issues/2426).
- Non-ISO timestamp settings prevented the opening of the entry editor (see [#2447](https://github.com/JabRef/jabref/issues/2447))


### Removed

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/net/sf/jabref/gui/date/DatePickerButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public JComponent getDatePicker() {
* @param dateString
*/
public void updateDatePickerDate(String dateString) {
// unregister DateChangeListener before update to prevent circular calls resulting in IllegalStateExceptions
datePicker.removeDateChangeListener(this);

if(dateString!=null && !dateString.isEmpty()) {
try {
datePicker.setDate(LocalDate.parse(dateString, dateTimeFormatter));
Expand All @@ -87,5 +90,7 @@ public void updateDatePickerDate(String dateString) {
+ "Clear button in calender popup will not work.");
}
}

datePicker.addDateChangeListener(this);
}
}