overlay: prevent moving non-movable overlays

This commit is contained in:
Adam
2022-05-19 17:53:18 -04:00
parent 004d321c15
commit bea1c6cb83

View File

@@ -341,7 +341,7 @@ public class OverlayRenderer extends MouseAdapter
if (!bounds.isEmpty()) if (!bounds.isEmpty())
{ {
if (inOverlayManagingMode) if (inOverlayManagingMode && overlay.isMovable())
{ {
Color boundsColor; Color boundsColor;
if (inOverlayResizingMode && currentManagedOverlay == overlay) if (inOverlayResizingMode && currentManagedOverlay == overlay)
@@ -391,7 +391,7 @@ public class OverlayRenderer extends MouseAdapter
// See if we've clicked on an overlay // See if we've clicked on an overlay
currentManagedOverlay = lastHoveredOverlay; currentManagedOverlay = lastHoveredOverlay;
if (currentManagedOverlay == null) if (currentManagedOverlay == null || !currentManagedOverlay.isMovable())
{ {
return mouseEvent; return mouseEvent;
} }