diff --git a/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/plugins/statusbar/StatusBar.java b/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/plugins/statusbar/StatusBar.java index 20d0d6ae..6c1badaf 100644 --- a/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/plugins/statusbar/StatusBar.java +++ b/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/plugins/statusbar/StatusBar.java @@ -239,7 +239,7 @@ public class StatusBar extends JPanel implements IPlugIn { if (componentSlot == null) { if (componentsUnderCursor != null && !componentsUnderCursor.isEmpty()) { String formattedNames = Utils.toCommaString(componentsUnderCursor); - getStatusLabel().setText("Drag control points of " + formattedNames); + getStatusLabel().setText("Drag control point(s) of " + formattedNames); } else if (selectedComponentNames != null && !selectedComponentNames.isEmpty()) { StringBuilder builder = new StringBuilder(); builder.append(Utils.toCommaString(selectedComponentNames)); diff --git a/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/ProjectPainter.java b/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/ProjectPainter.java index 720ac8a3..e2623d70 100644 --- a/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/ProjectPainter.java +++ b/ diy-layout-creator --username bancika@gmail.com/DIYLC/src/org/diylc/presenter/ProjectPainter.java @@ -133,20 +133,28 @@ public class ProjectPainter { } } - g2dWrapper.setColor(Constants.CONTROL_POINT_COLOR); // Draw control points. - for (IDIYComponent component : project.getComponents()) { - if (drawOptions.contains(DrawOption.CONTROL_POINTS)) { + if (drawOptions.contains(DrawOption.CONTROL_POINTS)) { + // Draw unselected points first to make sure they are below. + for (IDIYComponent component : project.getComponents()) { + if (drawControlPoints.contains(component) + && !selectedComponents.contains(component)) { + g2dWrapper.setColor(Constants.CONTROL_POINT_COLOR); + for (int i = 0; i < component.getControlPointCount(); i++) { + Point controlPoint = component.getControlPoint(i); + int pointSize = CONTROL_POINT_SIZE - 2; + g2dWrapper.fillOval(controlPoint.x - pointSize / 2, controlPoint.y + - pointSize / 2, pointSize, pointSize); + } + } + } + // Then draw the selected ones. + for (IDIYComponent component : selectedComponents) { if (drawControlPoints.contains(component)) { - boolean isSelected = selectedComponents.contains(component); - g2dWrapper.setColor(isSelected ? Constants.SELECTED_CONTROL_POINT_COLOR - : Constants.CONTROL_POINT_COLOR); + g2dWrapper.setColor(Constants.SELECTED_CONTROL_POINT_COLOR); for (int i = 0; i < component.getControlPointCount(); i++) { Point controlPoint = component.getControlPoint(i); int pointSize = CONTROL_POINT_SIZE; - if (!isSelected) { - pointSize -= 2; - } g2dWrapper.fillOval(controlPoint.x - pointSize / 2, controlPoint.y - pointSize / 2, pointSize, pointSize); }