mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
fixed d&d bug with multiple selection
This commit is contained in:
+8
-8
@@ -433,10 +433,10 @@ public class Presenter implements IPlugInPort {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If CTRL is pressed, we only care about the top most component.
|
// // If CTRL is pressed, we only care about the top most component.
|
||||||
if (altDown && components.size() > 0) {
|
// if (altDown && components.size() > 0) {
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
messageDispatcher.dispatchMessage(EventType.MOUSE_MOVED, scaledPoint);
|
messageDispatcher.dispatchMessage(EventType.MOUSE_MOVED, scaledPoint);
|
||||||
@@ -510,17 +510,17 @@ public class Presenter implements IPlugInPort {
|
|||||||
}
|
}
|
||||||
// If there aren't any control points, try to add all the selected
|
// If there aren't any control points, try to add all the selected
|
||||||
// components with all their control points. That will allow the
|
// components with all their control points. That will allow the
|
||||||
// user to
|
// user to drag the whole components.
|
||||||
// drag the whole component.
|
|
||||||
for (IDIYComponent<?> c : selectedComponents) {
|
for (IDIYComponent<?> c : selectedComponents) {
|
||||||
Set<Integer> pointIndices = new HashSet<Integer>();
|
Set<Integer> pointIndices = new HashSet<Integer>();
|
||||||
if (component.getControlPointCount() > 0) {
|
if (c.getControlPointCount() > 0) {
|
||||||
for (int i = 0; i < component.getControlPointCount(); i++) {
|
for (int i = 0; i < c.getControlPointCount(); i++) {
|
||||||
pointIndices.add(i);
|
pointIndices.add(i);
|
||||||
}
|
}
|
||||||
controlPointMap.put(c, pointIndices);
|
controlPointMap.put(c, pointIndices);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOG.debug(controlPointMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user