From 258dceffab4e39e6df264ab32e1b86d34e920310 Mon Sep 17 00:00:00 2001 From: Dawid Motyka Date: Fri, 21 Feb 2020 12:38:05 +0100 Subject: [PATCH] Set BibEntry to "changed" state before setting a new entry type (#5966) * Fix: setting BibEntry to "changed" state before setting a new entry type fixes #5905 * Update changelog --- CHANGELOG.md | 1 + src/main/java/org/jabref/model/entry/BibEntry.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc54a7340b..ebb90f3c68b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We fixed an issue in the optics of the library properties, that cropped the dialog on scaled displays. [#5969](https://github.com/JabRef/jabref/issues/5969) - We fixed an issue where changing the type of an entry did not update the main table. [#5906](https://github.com/JabRef/jabref/issues/5906) - We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939) +- We fixed an issue where changing entry type doesn't always work when biblatex source is shown. [#5905](https://github.com/JabRef/jabref/issues/5905) ### Removed diff --git a/src/main/java/org/jabref/model/entry/BibEntry.java b/src/main/java/org/jabref/model/entry/BibEntry.java index 8d5fcb68207..bfe7cadc8c8 100644 --- a/src/main/java/org/jabref/model/entry/BibEntry.java +++ b/src/main/java/org/jabref/model/entry/BibEntry.java @@ -359,8 +359,8 @@ public Optional setType(EntryType newType, EntriesEventSource event return Optional.empty(); } - this.type.setValue(newType); changed = true; + this.type.setValue(newType); FieldChange change = new FieldChange(this, InternalField.TYPE_HEADER, oldType.getName(), newType.getName()); eventBus.post(new FieldChangedEvent(change, eventSource));