Skip to content

Commit

Permalink
Set BibEntry to "changed" state before setting a new entry type (#5966)
Browse files Browse the repository at this point in the history
* Fix: setting BibEntry to "changed" state before setting a new entry type

fixes #5905

* Update changelog
  • Loading branch information
dawidm authored Feb 21, 2020
1 parent c3a364d commit 258dcef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/model/entry/BibEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ public Optional<FieldChange> 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));
Expand Down

0 comments on commit 258dcef

Please sign in to comment.