screen marker overlay: stop if preferred size is null
If the overlay renderer has no size saved in the config this can happen
This commit is contained in:
@@ -63,11 +63,18 @@ public class ScreenMarkerOverlay extends Overlay
|
||||
return null;
|
||||
}
|
||||
|
||||
Dimension preferredSize = getPreferredSize();
|
||||
if (preferredSize == null)
|
||||
{
|
||||
// overlay has no preferred size in the renderer configuration!
|
||||
return null;
|
||||
}
|
||||
|
||||
screenMarkerRenderable.setBorderThickness(marker.getBorderThickness());
|
||||
screenMarkerRenderable.setColor(marker.getColor());
|
||||
screenMarkerRenderable.setFill(marker.getFill());
|
||||
screenMarkerRenderable.setStroke(new BasicStroke(marker.getBorderThickness()));
|
||||
screenMarkerRenderable.setPreferredSize(getPreferredSize());
|
||||
screenMarkerRenderable.setPreferredSize(preferredSize);
|
||||
return screenMarkerRenderable.render(graphics);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user