overlay renderer: don't allow moving dynamic or tooltip overlays
Originally this was fixed ind02ddfc1b2but then broken ind676542dc2. 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:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user