Remove toggle interaction with pot back

This commit is contained in:
Bane Stojkovic
2022-11-23 23:59:13 +01:00
parent a9036e7b19
commit a7bdac4d52
8 changed files with 15 additions and 10 deletions
@@ -382,7 +382,7 @@ public class NetlistBuilder {
for (ProjectGraphNode pointNode : entry.getValue()) { for (ProjectGraphNode pointNode : entry.getValue()) {
List<ProjectGraphNode> areaNodesBelowPoint = candidateAreaNodes.stream() List<ProjectGraphNode> areaNodesBelowPoint = candidateAreaNodes.stream()
.filter(x -> x.getArea().getZIndex() < pointNode.getZIndex()) .filter(x -> x.getArea().getZIndex() <= pointNode.getZIndex())
.sorted(Comparator.comparing(x -> x.getArea().getZIndex(), Comparator.reverseOrder())) .sorted(Comparator.comparing(x -> x.getArea().getZIndex(), Comparator.reverseOrder()))
.collect(Collectors.toList()); .collect(Collectors.toList());
Binary file not shown.
@@ -308,14 +308,21 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
} }
for (Point2D p : controlPoints) { for (Point2D p : controlPoints) {
if (outlineMode) { if (outlineMode) {
g2d.setColor(Constants.TRANSPARENT_COLOR);
drawingObserver.startTrackingContinuityArea(true);
g2d.fillRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
drawingObserver.stopTrackingContinuityArea();
g2d.setColor(theme.getOutlineColor()); g2d.setColor(theme.getOutlineColor());
g2d.drawRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight); g2d.drawRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
} else { } else {
g2d.setColor(CIRCLE_COLOR); g2d.setColor(CIRCLE_COLOR);
g2d.fillOval((int)(p.getX() - circleDiameter / 2), (int)(p.getY() - circleDiameter / 2), circleDiameter, circleDiameter); g2d.fillOval((int)(p.getX() - circleDiameter / 2), (int)(p.getY() - circleDiameter / 2), circleDiameter, circleDiameter);
g2d.setColor(METAL_COLOR); g2d.setColor(METAL_COLOR);
g2d.fillRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight); drawingObserver.startTrackingContinuityArea(true);
g2d.fillRect((int)(p.getX() - lugWidth / 2), (int)(p.getY() - lugHeight / 2), lugWidth, lugHeight);
drawingObserver.stopTrackingContinuityArea();
} }
} }
} }
@@ -279,10 +279,10 @@ public class PotentiometerPanel extends AbstractPotentiometer {
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1f * alpha / MAX_ALPHA)); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1f * alpha / MAX_ALPHA));
} }
if (!outlineMode) { if (!outlineMode) {
if (i == 3) if (i >= 3 && i <= 6)
drawingObserver.startTrackingContinuityArea(true); drawingObserver.startTrackingContinuityArea(true);
g2d.fill(shape); g2d.fill(shape);
if (i == 3) if (i >= 3 && i <= 6)
drawingObserver.stopTrackingContinuityArea(); drawingObserver.stopTrackingContinuityArea();
} }
g2d.setComposite(oldComposite); g2d.setComposite(oldComposite);
-2
View File
@@ -49,7 +49,6 @@ AWG
Alternate Alternate
And And
Angle Offset Angle Offset
Apply Model
B-C-E BJT B-C-E BJT
Background Background
Box Box
@@ -94,7 +93,6 @@ G-D-S MOSFET
G-O-I REGULATOR G-O-I REGULATOR
G-S-D JFET G-S-D JFET
G-S-D MOSFET G-S-D MOSFET
GF1
Generate DIYLC Netlist (excl. Switches) Generate DIYLC Netlist (excl. Switches)
Generate DIYLC Netlist (incl. Switches) Generate DIYLC Netlist (incl. Switches)
Gray Gray
Binary file not shown.
Binary file not shown.
@@ -1988,7 +1988,7 @@ public class ActionFactory {
@Override @Override
public void complete(List<Netlist> res) { public void complete(List<Netlist> res) {
LOG.info("Finished fenerating netlist"); LOG.info("Finished generating netlist");
if (res == null) { if (res == null) {
swingUI.showMessage("The generated netlist is empty, nothing to show.", "DIYLC Netlist", swingUI.showMessage("The generated netlist is empty, nothing to show.", "DIYLC Netlist",
ISwingUI.INFORMATION_MESSAGE); ISwingUI.INFORMATION_MESSAGE);