mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-18 01:14:42 -04:00
Limited the size of the "missing shape" shape.
This commit is contained in:
parent
f118a6c565
commit
5245e52b4d
@ -29,6 +29,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.*;
|
||||
@ -511,7 +512,7 @@ public class ElementLibrary implements Iterable<ElementLibrary.ElementContainer>
|
||||
Circuit circuit;
|
||||
try {
|
||||
circuit = Circuit.loadCircuit(file, shapeFactory);
|
||||
} catch (IOException e) {
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new IOException(Lang.get("err_couldNotFindIncludedFile_N0", file));
|
||||
}
|
||||
ElementTypeDescriptionCustom description =
|
||||
|
@ -49,7 +49,10 @@ public class MissingShape implements Shape {
|
||||
int y = 4;
|
||||
while (c != null) {
|
||||
y += style.getFontSize();
|
||||
graphic.drawText(new Vector(4, y), new Vector(5, y), c.getMessage(), Orientation.LEFTTOP, style);
|
||||
String message = c.getMessage();
|
||||
if (message.length() > 100)
|
||||
message = message.substring(0, 100) + "...";
|
||||
graphic.drawText(new Vector(4, y), new Vector(5, y), message, Orientation.LEFTTOP, style);
|
||||
c = c.getCause();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user