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