overlay renderer: don't allow moving dynamic or tooltip overlays

Originally this was fixed in d02ddfc1b2 but then
broken in d676542dc2. Preferred positions don't
make sense for either overlay type and for tooltips breaks them due to having
them offset from the mouse position.
This commit is contained in:
Adam
2020-09-26 00:04:57 -04:00
parent 47e0ac8032
commit 6df3016bb5

View File

@@ -381,6 +381,12 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener
{
for (Overlay overlay : overlayManager.getOverlays())
{
if (overlay.getPosition() == OverlayPosition.DYNAMIC || overlay.getPosition() == OverlayPosition.TOOLTIP)
{
// never allow moving dynamic or tooltip overlays
continue;
}
final Rectangle bounds = overlay.getBounds();
if (bounds.contains(mousePoint))
{