|
@@ -383,7 +383,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
for (Point p : pointList) {
|
|
for (Point p : pointList) {
|
|
if (x >= p.getX() - recSize.getX() / 2 && y >= p.getY() - recSize.getY() / 2
|
|
if (x >= p.getX() - recSize.getX() / 2 && y >= p.getY() - recSize.getY() / 2
|
|
&& x <= p.getX() + recSize.getX() / 2 && y <= p.getY() * scaleY + recSize.getY() / 2) {
|
|
&& x <= p.getX() + recSize.getX() / 2 && y <= p.getY() * scaleY + recSize.getY() / 2) {
|
|
- if (e.getButton() == MouseEvent.BUTTON3) {
|
|
|
|
|
|
+ if (e.getButton() == MouseEvent.BUTTON3) {//TODO: test
|
|
tempP = p;
|
|
tempP = p;
|
|
deletePoint = true;
|
|
deletePoint = true;
|
|
} else {
|
|
} else {
|
|
@@ -414,7 +414,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
}
|
|
}
|
|
// Delete a Point
|
|
// Delete a Point
|
|
if (deletePoint && tempP.getX() != 0
|
|
if (deletePoint && tempP.getX() != 0
|
|
- && (tempP.getX() != this.getWidth() / scaleX || tempP != pointList.getLast())) {
|
|
|
|
|
|
+ && /*(*//*tempP.getX() != this.getWidth() / scaleX || */tempP != pointList.getLast())/*)*/ {
|
|
pointList.remove(tempP);
|
|
pointList.remove(tempP);
|
|
}
|
|
}
|
|
|
|
|