fix model

This commit is contained in:
François 2022-01-25 09:18:56 +01:00
parent 98c6db6ea5
commit bb39b6d3ea
2 changed files with 13 additions and 2 deletions

View File

@ -119,6 +119,7 @@ public abstract class Embedded<P extends XmlPermanent<T, A>, T extends Enum<?>,
if (visited.contains (this)) if (visited.contains (this))
return; return;
super.getLocalLink (visited, unitLinks, iconsLinks, imagesLinks); super.getLocalLink (visited, unitLinks, iconsLinks, imagesLinks);
if (model != null)
model.getLocalLink (visited, unitLinks, iconsLinks, imagesLinks); model.getLocalLink (visited, unitLinks, iconsLinks, imagesLinks);
} }

View File

@ -706,7 +706,17 @@ public abstract class Workspace extends Unit<Item<?, ?, ?>> {
Circuits.CircuitState circuitState = circuits.getState (plugedComp, acc); Circuits.CircuitState circuitState = circuits.getState (plugedComp, acc);
if (circuitState == null) if (circuitState == null)
continue; continue;
Acc.printCircuit (printGraphics, lineWidth, plugedComp.getAccCenter (acc.getId ()), circuitState); Point2D c = plugedComp.getAccCenter (acc.getId ());
// try {
// Comp endComp = (Comp) namedItems.get (acc.getConnectedTo ());
// Point2D a = plugedComp.getAccCenter (acc.getId ());
// Point2D b = endComp.getAccCenter (acc.getConnectedOn ());
// c = new Point2D.Double ((1*a.getX ()+b.getX ())/2, (1*a.getY ()+b.getY ())/2);
// } catch (Exception e) {
// }
// XXX
//Acc.printCircuit (printGraphics, lineWidth, c, circuitState);
Acc.printCircuit (printGraphics, c, circuitState, .4);
} }
} }