mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user