mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
In cases when there's already a component in the selection that is
reduced to nothing, allow moving the selection
This commit is contained in:
@@ -1359,7 +1359,17 @@ public class Presenter implements IPlugInPort {
|
||||
|
||||
// Validate if moving can be done.
|
||||
for (Map.Entry<IDIYComponent<?>, Set<Integer>> entry : controlPointMap.entrySet()) {
|
||||
// check if a component already has overlapping points because of a previous error, in that case skip it
|
||||
boolean skip = false;
|
||||
IDIYComponent<?> component = entry.getKey();
|
||||
for (int i = 0; i < component.getControlPointCount() - 1 && !skip; i++)
|
||||
for (int j = i + 1; j < component.getControlPointCount() && !skip; j++)
|
||||
if (component.getControlPoint(i).equals(component.getControlPoint(j)))
|
||||
skip = true;
|
||||
|
||||
if (skip)
|
||||
continue;
|
||||
|
||||
Point2D[] controlPoints = new Point2D[component.getControlPointCount()];
|
||||
for (int index = 0; index < component.getControlPointCount(); index++) {
|
||||
Point2D p = component.getControlPoint(index);
|
||||
|
||||
@@ -3301,6 +3301,10 @@
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Do not allow for components like traces, jumpers and wires to be reduced to nothing by dragging connected components</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>In cases when there's already a component in the selection that is reduced to nothing, allow moving the selection</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
|
||||
Reference in New Issue
Block a user