Skip to content

Commit

Permalink
Fix #725 Do not unintentionally clear optional2 list before saving
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-kolb committed Jan 27, 2016
1 parent 01b4255 commit 367896c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import net.sf.jabref.logic.l10n.Localization;
import net.sf.jabref.model.entry.*;

public class EntryCustomizationDialog2 extends JDialog implements ListSelectionListener, ActionListener {
public class EntryCustomizationDialog extends JDialog implements ListSelectionListener, ActionListener {

private final JabRefFrame frame;
protected GridBagLayout gbl = new GridBagLayout();
Expand Down Expand Up @@ -63,9 +63,9 @@ public class EntryCustomizationDialog2 extends JDialog implements ListSelectionL


/**
* Creates a new instance of EntryCustomizationDialog2
* Creates a new instance of EntryCustomizationDialog
*/
public EntryCustomizationDialog2(JabRefFrame frame) {
public EntryCustomizationDialog(JabRefFrame frame) {
super(frame, Localization.lang("Customize entry types"), false);

this.frame = frame;
Expand Down Expand Up @@ -236,7 +236,7 @@ private void applyChanges() {
List<String> optStr = optLists.get(stringListEntry.getKey());
List<String> opt2Str = opt2Lists.get(stringListEntry.getKey());

if (opt2Str != null) {
if (opt2Str == null) {
opt2Str = new ArrayList<>(0);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sf/jabref/gui/EntryTypeList.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/**
* This class extends FieldSetComponent to provide some required functionality for the
* list of entry types in EntryCustomizationDialog2.
* list of entry types in EntryCustomizationDialog.
* @author alver
*/
public class EntryTypeList extends FieldSetComponent implements ListSelectionListener {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sf/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ public CustomizeEntryTypeAction() {

@Override
public void actionPerformed(ActionEvent e) {
JDialog dl = new EntryCustomizationDialog2(JabRefFrame.this);
JDialog dl = new EntryCustomizationDialog(JabRefFrame.this);
PositionWindow.placeDialog(dl, JabRefFrame.this);
dl.setVisible(true);
}
Expand Down

0 comments on commit 367896c

Please sign in to comment.