Skip to content

Commit

Permalink
Merge pull request #3152 from JabRef/fixReplaceString
Browse files Browse the repository at this point in the history
Make Replace Strings work in bibtexkeyfield
  • Loading branch information
koppor authored Aug 25, 2017
2 parents 0d7dbb9 + c95533d commit c00b03f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
### Changed

- Added 'Filter All' and 'Filter None' buttons with corresponding functionality to Quality Check tool.

### Fixed
- We re-added the "Normalize to BibTeX name format" context menu item [#3136](https://github.com/JabRef/jabref/issues/3136)
- We fixed a memory leak in the source tab of the entry editor [#3113](https://github.com/JabRef/jabref/issues/3113)
- We fixed a [java bug](https://bugs.openjdk.java.net/browse/JDK-8185792) where linux users could not enter accented characters in the entry editor and the search bar [#3028](https://github.com/JabRef/jabref/issues/3028)
- We fixed a regression introduced in v4.0-beta2: A file can be dropped to the entry preview to attach it to the entry [koppor#245](https://github.com/koppor/jabref/issues/245)

- We fixed an issue in the "Replace String" dialog (<kbd>Ctrl</kbd>+<kbd>R</kbd> where search and replace did not work for the `bibtexkey` field. [#3132](https://github.com/JabRef/jabref/issues/3132)
### Removed


Expand Down
8 changes: 1 addition & 7 deletions src/main/java/org/jabref/gui/ReplaceStringDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,13 @@ public boolean selOnly() {
public int replace(BibEntry be, NamedCompound ce) {
int counter = 0;
if (allFields()) {

for (String s : be.getFieldNames()) {
if (!s.equals(BibEntry.KEY_FIELD)) {
counter += replaceField(be, s, ce);
}
counter += replaceField(be, s, ce);
}
} else {
for (String fld : fieldStrings) {
if (!fld.equals(BibEntry.KEY_FIELD)) {
counter += replaceField(be, fld, ce);
}
}

}
return counter;
}
Expand Down

0 comments on commit c00b03f

Please sign in to comment.