With multiple components selected, if one of them is a single-point

component (pad, eyelet, etc), starting a drag operation on that
components results in losing the selection on the others
This commit is contained in:
bancika
2020-04-09 16:59:34 +02:00
parent 56f637b5e2
commit f103f2970b
6 changed files with 8 additions and 2 deletions
@@ -76,6 +76,7 @@ import org.diylc.core.IView;
import org.diylc.core.Project; import org.diylc.core.Project;
import org.diylc.core.Template; import org.diylc.core.Template;
import org.diylc.core.Theme; import org.diylc.core.Theme;
import org.diylc.core.VisibilityPolicy;
import org.diylc.core.annotations.IAutoCreator; import org.diylc.core.annotations.IAutoCreator;
import org.diylc.core.measures.Size; import org.diylc.core.measures.Size;
import org.diylc.core.measures.SizeUnit; import org.diylc.core.measures.SizeUnit;
@@ -862,7 +863,8 @@ public class Presenter implements IPlugInPort {
if (selectedComponents.contains(component) && component.canPointMoveFreely(pointIndex) if (selectedComponents.contains(component) && component.canPointMoveFreely(pointIndex)
&& findAllGroupedComponents(component).size() == 1) { && findAllGroupedComponents(component).size() == 1) {
try { try {
if (previousScaledPoint.distance(controlPoint) < DrawingManager.CONTROL_POINT_SIZE) { if (previousScaledPoint.distance(controlPoint) < DrawingManager.CONTROL_POINT_SIZE &&
component.getControlPointVisibilityPolicy(pointIndex) != VisibilityPolicy.NEVER) {
Set<Integer> indices = new HashSet<Integer>(); Set<Integer> indices = new HashSet<Integer>();
indices.add(pointIndex); indices.add(pointIndex);
components.put(component, indices); components.put(component, indices);
@@ -2917,6 +2917,10 @@
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType> <changeType>BUG_FIX</changeType>
<description>Switched terminal on the "Open Jack 1/4" does not stick to other components</description> <description>Switched terminal on the "Open Jack 1/4" does not stick to other components</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>With multiple components selected, if one of them is a single-point component (pad, eyelet, etc), starting a drag operation on that components results in losing the selection on the others</description>
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
</changes> </changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url> <url>https://github.com/bancika/diy-layout-creator/releases</url>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -326,7 +326,7 @@ public class CanvasPanel extends JComponent implements Autoscroll {
// Autoscroll // Autoscroll
private int autoScrollSize = 100; private int autoScrollSize = 64;
@Override @Override
public void autoscroll(Point cursorLocn) { public void autoscroll(Point cursorLocn) {