From c95533dce459a80ec77025b51bad568a9add171b Mon Sep 17 00:00:00 2001 From: siedlerchr Date: Thu, 24 Aug 2017 15:54:19 +0200 Subject: [PATCH] Make Replace Strings work in bibtexkeyfield --- CHANGELOG.md | 3 +-- src/main/java/org/jabref/gui/ReplaceStringDialog.java | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2046f15895b..100a20819a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 (Ctrl+R where search and replace did not work for the `bibtexkey` field. [#3132](https://github.com/JabRef/jabref/issues/3132) ### Removed diff --git a/src/main/java/org/jabref/gui/ReplaceStringDialog.java b/src/main/java/org/jabref/gui/ReplaceStringDialog.java index 8198f93d983..6d5175bd9be 100644 --- a/src/main/java/org/jabref/gui/ReplaceStringDialog.java +++ b/src/main/java/org/jabref/gui/ReplaceStringDialog.java @@ -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; }