mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-28 07:28:20 -04:00
fixed an missing shape issue
Added some more error details in case of importing errors.
This commit is contained in:
parent
170b90c918
commit
de4bbe448e
@ -1,18 +1,18 @@
|
||||
Release Notes
|
||||
|
||||
Planned as v0.12
|
||||
- Added a locked mode, which avoids the unwanted modification of the circuit.
|
||||
- Better support for high dpi screens.
|
||||
- Added a pin number attribute to inputs and outputs.
|
||||
- Added DIL packages to allow more "physical" circuits. See examples/74xx.
|
||||
Up to now only a view 74xx circuits are available.
|
||||
- Add some functions to make it easier to create 74xx circuits.
|
||||
- Added undo/redo functions.
|
||||
- New wire drawing mode: If a wire is added it is rectangular by default.
|
||||
In rectangular mode "F" flips the wire and pressing "D" switches to diagonal mode.
|
||||
- Added inverted inputs for basic gates and flip-flops.
|
||||
- Added a locked mode, which avoids the unwanted modification of the circuit.
|
||||
- Better support for high dpi screens.
|
||||
- Added DIL packages to allow more "physical" circuits. See examples/74xx.
|
||||
Up to now only a view 74xx circuits are available.
|
||||
- Added a pin number attribute to inputs and outputs.
|
||||
- Add some functions to make it easier to create 74xx circuits.
|
||||
- Lots of small usability improvements.
|
||||
- Added a list of keyboard shortcuts to the documentation
|
||||
- Added a list of keyboard shortcuts to the documentation.
|
||||
|
||||
v0.11.1, released on 02. May 2017
|
||||
- Added the possibility to open a circuit from the command line.
|
||||
|
@ -150,7 +150,7 @@ public class LibraryNode implements Iterable<LibraryNode> {
|
||||
public ElementTypeDescription getDescription() throws IOException {
|
||||
if (description == null) {
|
||||
if (!unique)
|
||||
throw new IOException(Lang.get("err_file_N0_ExistsTwiceBelow_N1", file, library.getRootFilePath()));
|
||||
throw new IOException(Lang.get("err_file_N0_ExistsTwiceBelow_N1", file.getName(), library.getRootFilePath()));
|
||||
try {
|
||||
description = library.importElement(file);
|
||||
} catch (IOException e) {
|
||||
|
@ -17,7 +17,7 @@ import de.neemann.digital.lang.Lang;
|
||||
public class MissingShape implements Shape {
|
||||
|
||||
private final Pins pins = new Pins();
|
||||
private final String cause;
|
||||
private final Exception cause;
|
||||
private final String message;
|
||||
|
||||
/**
|
||||
@ -28,7 +28,7 @@ public class MissingShape implements Shape {
|
||||
*/
|
||||
public MissingShape(String elementName, Exception cause) {
|
||||
this.message = Lang.get("msg_missingShape_N", elementName);
|
||||
this.cause = cause.getMessage();
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -45,7 +45,12 @@ public class MissingShape implements Shape {
|
||||
public void drawTo(Graphic graphic, Style highLight) {
|
||||
Style style = Style.NORMAL_TEXT;
|
||||
graphic.drawText(new Vector(4, 4), new Vector(5, 4), message, Orientation.LEFTTOP, style);
|
||||
if (cause != null && cause.length() > 0)
|
||||
graphic.drawText(new Vector(4, 4 + style.getFontSize()), new Vector(5, 4 + style.getFontSize()), cause, Orientation.LEFTTOP, style);
|
||||
Throwable c = cause;
|
||||
int y = 4;
|
||||
while (c != null) {
|
||||
y += style.getFontSize();
|
||||
graphic.drawText(new Vector(4, y), new Vector(5, y), c.getMessage(), Orientation.LEFTTOP, style);
|
||||
c = c.getCause();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user