mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Fixed bug with "Highlight Continuity Areas" that makes random components
conductive
This commit is contained in:
@@ -35,5 +35,7 @@ public interface IDrawingObserver {
|
||||
|
||||
void stopTrackingContinuityArea();
|
||||
|
||||
void startTrackingContinuityArea(boolean positive);
|
||||
void startTrackingContinuityArea(boolean positive);
|
||||
|
||||
boolean isTrackingContinuityArea();
|
||||
}
|
||||
|
||||
@@ -264,6 +264,10 @@ public class DrawingManager {
|
||||
// Draw the component through the g2dWrapper.
|
||||
try {
|
||||
component.draw(g2dWrapper, state, drawOptions.contains(DrawOption.OUTLINE_MODE), project, g2dWrapper);
|
||||
if (g2dWrapper.isTrackingContinuityArea()) {
|
||||
LOG.info("Component " + component.getName() + " of type " + component.getClass().getName() + " did not stop tracking continuity area.");
|
||||
g2dWrapper.stopTrackingContinuityArea();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error drawing " + component.getName(), e);
|
||||
failedComponents.add(component);
|
||||
|
||||
@@ -162,6 +162,10 @@ class G2DWrapper extends Graphics2D implements IDrawingObserver {
|
||||
this.trackingContinuityAllowed = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTrackingContinuityArea() {
|
||||
return trackingContinuityAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends shape interior to the current component area.
|
||||
|
||||
Reference in New Issue
Block a user