Auto update bounds on points save.

Select cursor.
This commit is contained in:
Jindra Petřík
2022-12-29 22:02:16 +01:00
parent ba01de17a1
commit d13d3ac500
5 changed files with 20 additions and 5 deletions

View File

@@ -384,6 +384,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
}
public void setHilightedPoints(List<DisplayPoint> hilightedPoints) {
hilightedEdge = null;
selectedPoints = new ArrayList<>();
calculatePointsXY();
this.hilightedPoints = hilightedPoints;
@@ -393,7 +394,9 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
public void setHilightedEdge(Point[] hilightedEdge) {
this.hilightedEdge = hilightedEdge;
hilightedPoints = null;
hilightEdgeColor = 255;
pointEditPanel.setVisible(false);
redraw();
}
@@ -1627,7 +1630,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
public void mouseMoved(MouseEvent e) {
List<DisplayPoint> points = hilightedPoints;
if (points != null) {
Cursor cursor = defaultCursor;
Cursor cursor = selectCursor;
int maxDistance = 5;
List<Integer> newPointsUnderCursor = new ArrayList<>();
for (int i = 0; i < points.size(); i++) {