mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-27 15:03:21 -04:00
better handling of migration of multi line text
This commit is contained in:
parent
cbfa95f457
commit
b454445b14
@ -1,6 +1,7 @@
|
|||||||
Release Notes
|
Release Notes
|
||||||
|
|
||||||
planned as v0.13
|
planned as v0.13
|
||||||
|
- Added a barrel shifter (thanks to roy77)
|
||||||
- In case of oscillations almost all affected components are shown.
|
- In case of oscillations almost all affected components are shown.
|
||||||
- If an error occurs, the name of the affected circuit file is shown.
|
- If an error occurs, the name of the affected circuit file is shown.
|
||||||
- An input can have "high z" value as its default value.
|
- An input can have "high z" value as its default value.
|
||||||
@ -18,8 +19,6 @@ planned as v0.13
|
|||||||
- Added zooming to measurement graphs.
|
- Added zooming to measurement graphs.
|
||||||
- Test results can be displayed as measurement graphs.
|
- Test results can be displayed as measurement graphs.
|
||||||
- The Text component is able to show multiple lines.
|
- The Text component is able to show multiple lines.
|
||||||
CAUTION: If you modify the text in an text component created in the past, you have to
|
|
||||||
reenter the text.
|
|
||||||
|
|
||||||
v0.12.1, released on 05. Jun 2016
|
v0.12.1, released on 05. Jun 2016
|
||||||
- added a fuse to simulate a PROM or PAL.
|
- added a fuse to simulate a PROM or PAL.
|
||||||
|
@ -32,8 +32,13 @@ public class TextShape implements Shape {
|
|||||||
public TextShape(ElementAttributes attr, PinDescriptions inputs, PinDescriptions outputs) {
|
public TextShape(ElementAttributes attr, PinDescriptions inputs, PinDescriptions outputs) {
|
||||||
String text = attr.get(Keys.DESCRIPTION);
|
String text = attr.get(Keys.DESCRIPTION);
|
||||||
|
|
||||||
if (text.length() == 0) // ToDo: used to show the text from old files.
|
if (text.length() == 0) { // ToDo: used to be compatible with old files. Can be removed in the future
|
||||||
text = attr.getLabel();
|
text = attr.getLabel();
|
||||||
|
if (text.length() > 0) {
|
||||||
|
attr.set(Keys.DESCRIPTION, text);
|
||||||
|
attr.set(Keys.LABEL, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (text.length() == 0)
|
if (text.length() == 0)
|
||||||
text = Lang.get("elem_Text");
|
text = Lang.get("elem_Text");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user