Reset clue overlay preferred size each render

To prevent affecting other clue types, reset the preferred size of the
clue scroll panel component to default value each render cycle, as the
clues can modify it.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-05-12 18:31:08 +02:00
parent a583b150e7
commit 0829ea607b

View File

@@ -33,6 +33,7 @@ import javax.inject.Inject;
import net.runelite.client.plugins.cluescrolls.clues.ClueScroll;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayPriority;
import net.runelite.client.ui.overlay.components.ComponentConstants;
import net.runelite.client.ui.overlay.components.PanelComponent;
public class ClueScrollOverlay extends Overlay
@@ -60,6 +61,7 @@ public class ClueScrollOverlay extends Overlay
}
panelComponent.getChildren().clear();
panelComponent.setPreferredSize(new Dimension(ComponentConstants.STANDARD_WIDTH, 0));
clue.makeOverlayHint(panelComponent, plugin);