fixed inconsistent key usage in TableDialog.java

This commit is contained in:
hneemann 2017-09-10 13:11:14 +02:00
parent 5a602cb534
commit 8b13cb3796

View File

@ -66,7 +66,7 @@ public class TableDialog extends JDialog {
static { static {
LIST.add(Keys.LABEL); LIST.add(Keys.LABEL);
LIST.add(Keys.PIN); LIST.add(Keys.PINNUMBER);
} }
private final JTextPane statusBar; private final JTextPane statusBar;
@ -242,12 +242,12 @@ public class TableDialog extends JDialog {
attr.set(Keys.LABEL, name); attr.set(Keys.LABEL, name);
final TreeMap<String, String> pins = model.getTable().getPins(); final TreeMap<String, String> pins = model.getTable().getPins();
if (pins.containsKey(name)) if (pins.containsKey(name))
attr.set(Keys.PIN, pins.get(name)); attr.set(Keys.PINNUMBER, pins.get(name));
ElementAttributes modified = new AttributeDialog(this, pos, LIST, attr).showDialog(); ElementAttributes modified = new AttributeDialog(this, pos, LIST, attr).showDialog();
if (modified != null) { if (modified != null) {
pins.remove(name); pins.remove(name);
final String newName = modified.get(Keys.LABEL).trim().replace(' ', '_'); final String newName = modified.get(Keys.LABEL).trim().replace(' ', '_');
final String pinStr = modified.get(Keys.PIN).trim(); final String pinStr = modified.get(Keys.PINNUMBER).trim();
if (pinStr.length() > 0) if (pinStr.length() > 0)
pins.put(newName, pinStr); pins.put(newName, pinStr);