Improved logic when moving component(s) that have other components stuck with them; in case there are non-sticky control points within the included components, they will be moved along retaining component shape (e.g. wires or curved traces)

This commit is contained in:
Bane Stojkovic
2026-04-04 20:54:32 +02:00
parent 30c6b4ec76
commit 5ce17b4ca2
2 changed files with 26 additions and 0 deletions
@@ -1212,6 +1212,28 @@ public class Presenter implements IPlugInPort {
includeStuckComponents(controlPointMap);
} else {
LOG.trace("Component count didn't change, done with expanding.");
for (Map.Entry<IDIYComponent<?>, Set<Integer>> entry : controlPointMap.entrySet()) {
IDIYComponent<?> component = entry.getKey();
Set<Integer> selectedPoints = entry.getValue();
boolean allStickyIncluded = true;
boolean hasSticky = false;
for (int i = 0; i < component.getControlPointCount(); i++) {
if (component.isControlPointSticky(i)) {
hasSticky = true;
if (!selectedPoints.contains(i)) {
allStickyIncluded = false;
break;
}
}
}
if (hasSticky && allStickyIncluded) {
for (int i = 0; i < component.getControlPointCount(); i++) {
if (!component.isControlPointSticky(i)) {
selectedPoints.add(i);
}
}
}
}
}
}
@@ -317,6 +317,10 @@
<changeType>NEW_FEATURE</changeType>
<description>Added more ceramic resistor variants to 'Resistor' component</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Improved logic when moving component(s) that have other components stuck with them; in case there are non-sticky control points within the included components, they will be moved along retaining component shape (e.g. wires or curved traces)</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Decommission 'Loadline Editor' option from the File menu</description>