diff --git a/distribution/ReleaseNotes.txt b/distribution/ReleaseNotes.txt index d56b326d1..8a4ec69b7 100644 --- a/distribution/ReleaseNotes.txt +++ b/distribution/ReleaseNotes.txt @@ -1,6 +1,7 @@ Release Notes planned as v0.13 +- Added a barrel shifter (thanks to roy77) - In case of oscillations almost all affected components are 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. @@ -18,8 +19,6 @@ planned as v0.13 - Added zooming to measurement graphs. - Test results can be displayed as measurement graphs. - 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 - added a fuse to simulate a PROM or PAL. diff --git a/src/main/java/de/neemann/digital/draw/shapes/TextShape.java b/src/main/java/de/neemann/digital/draw/shapes/TextShape.java index f2b42e29e..78d64d35c 100644 --- a/src/main/java/de/neemann/digital/draw/shapes/TextShape.java +++ b/src/main/java/de/neemann/digital/draw/shapes/TextShape.java @@ -32,8 +32,13 @@ public class TextShape implements Shape { public TextShape(ElementAttributes attr, PinDescriptions inputs, PinDescriptions outputs) { 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(); + if (text.length() > 0) { + attr.set(Keys.DESCRIPTION, text); + attr.set(Keys.LABEL, ""); + } + } if (text.length() == 0) text = Lang.get("elem_Text");