fixed d&d bug with multiple selection

This commit is contained in:
bancika
2011-01-11 18:54:53 +00:00
parent e9936e4adb
commit 37a7362d9e
@@ -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);
} }
} }