From fc062f33c35786dbace9edc54f40cd67b37d6d2c Mon Sep 17 00:00:00 2001 From: hneemann Date: Sun, 10 Sep 2017 20:05:43 +0200 Subject: [PATCH] removed shortcut 'B' --- distribution/ReleaseNotes.txt | 2 ++ .../gui/components/CircuitComponent.java | 34 ------------------- src/main/resources/lang/lang_de.xml | 1 - src/main/resources/lang/lang_en.xml | 1 - src/test/resources/docu/static_de.xml | 1 - src/test/resources/docu/static_en.xml | 1 - 6 files changed, 2 insertions(+), 38 deletions(-) diff --git a/distribution/ReleaseNotes.txt b/distribution/ReleaseNotes.txt index 590b4c14a..700a6edf6 100644 --- a/distribution/ReleaseNotes.txt +++ b/distribution/ReleaseNotes.txt @@ -3,6 +3,8 @@ Release Notes HEAD, planned as v0.15 - Added an EEPROM which behaves like a memory that can be written and whose content is non-volatile. +- Replaced shortcut 'B' with a more general attribute editing dialog (select + and left click). v0.14, released on 31. Aug 2017 - Added visualization of KV maps (thanks to roy77) diff --git a/src/main/java/de/neemann/digital/gui/components/CircuitComponent.java b/src/main/java/de/neemann/digital/gui/components/CircuitComponent.java index 41950ae38..39fdb2294 100644 --- a/src/main/java/de/neemann/digital/gui/components/CircuitComponent.java +++ b/src/main/java/de/neemann/digital/gui/components/CircuitComponent.java @@ -188,8 +188,6 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe new PlusMinusAction(1).setAccelerator("PLUS").enableAcceleratorIn(this); new PlusMinusAction(-1).setAccelerator("MINUS").enableAcceleratorIn(this); - new BitSetAction().setAccelerator("B").enableAcceleratorIn(this); - new ToolTipAction(Lang.get("menu_programDiode")) { @Override public void actionPerformed(ActionEvent e) { // is allowed also if locked! @@ -1045,38 +1043,6 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe } } - private final class BitSetAction extends ToolTipAction { - - private BitSetAction() { - super("setBits"); - } - - @Override - public void actionPerformed(ActionEvent e) { - if (!isLocked()) { - if (activeMouseController instanceof MouseControllerSelect) { - MouseControllerSelect mouseControllerSelect = (MouseControllerSelect) activeMouseController; - String num = JOptionPane.showInputDialog(CircuitComponent.this, Lang.get("key_Bits"), "1"); - if (num != null) { - try { - int bits = Integer.decode(num); - Vector c1 = mouseControllerSelect.corner1; - Vector c2 = mouseControllerSelect.corner2; - ModifySetBits modifySetBits = new ModifySetBits(c1, c2, bits); - if (modifySetBits.isSomethingToDo(circuit, library)) - modify(modifySetBits); - removeHighLighted(); - mouseNormal.activate(); - } catch (NumberFormatException ex) { - new ErrorMessage(Lang.get("msg_stringIsNotANumber_N", num)).show(CircuitComponent.this); - } - } - } - } - } - } - - private class MouseDispatcher extends MouseAdapter implements MouseMotionListener { private Vector pos; private boolean isMoved; diff --git a/src/main/resources/lang/lang_de.xml b/src/main/resources/lang/lang_de.xml index d15abcf94..15c0cf90a 100644 --- a/src/main/resources/lang/lang_de.xml +++ b/src/main/resources/lang/lang_de.xml @@ -1015,7 +1015,6 @@ eine <a href="https://github.com/hneemann/Digital/issues/new?labels=enha Es kann nur eine fehlerfreie Schaltung exportiert werden! Keine KV-Tafel verfügbar! Daten werden nicht mehr aktualisiert! - Der String {0} ist keine Zahl! Ok diff --git a/src/main/resources/lang/lang_en.xml b/src/main/resources/lang/lang_en.xml index a5dc65976..015169bc5 100644 --- a/src/main/resources/lang/lang_en.xml +++ b/src/main/resources/lang/lang_en.xml @@ -921,7 +921,6 @@ The names of the variables may not be unique. Documentation Open {0} Error opening a PDF file! - The string {0} is not a number! <h1>Digital</h1>A simple simulator for digital circuits. Written by H. Neemann in 2016, 2017. diff --git a/src/test/resources/docu/static_de.xml b/src/test/resources/docu/static_de.xml index 357475be0..df130f832 100644 --- a/src/test/resources/docu/static_de.xml +++ b/src/test/resources/docu/static_de.xml @@ -388,7 +388,6 @@ Speichern der Schaltung. Letzte Änderung zurücknehmen. Zurückgenommene Änderung erneut anwenden. - Anzahl der Datenbits in allen selektierten Elementen setzen. Programmieren einer Diode oder eines FG-FET. Beim Ziehen einer rechteckigen Leitung in den Diagonalmodus wechseln. Beim Ziehen einer rechteckigen Leitung die Orientierung wechseln. diff --git a/src/test/resources/docu/static_en.xml b/src/test/resources/docu/static_en.xml index f36d5a38a..4ed8b018b 100644 --- a/src/test/resources/docu/static_en.xml +++ b/src/test/resources/docu/static_en.xml @@ -326,7 +326,6 @@ Save the circuit. Undo last modification. Redo the last undone modification. - Set the number of data bits in all selected components. Programs a diode or a FG-FET. While drawing a wire switches to the diagonal mode. While drawing a line flips the orientation.