diff --git a/src/main/java/net/rptools/maptool/client/MapTool.java b/src/main/java/net/rptools/maptool/client/MapTool.java index 441d8470c6..33e96c68ba 100644 --- a/src/main/java/net/rptools/maptool/client/MapTool.java +++ b/src/main/java/net/rptools/maptool/client/MapTool.java @@ -107,9 +107,7 @@ import net.rptools.maptool.server.ServerConfig; import net.rptools.maptool.server.ServerPolicy; import net.rptools.maptool.transfer.AssetTransferManager; -import net.rptools.maptool.util.MessageUtil; -import net.rptools.maptool.util.StringUtil; -import net.rptools.maptool.util.UserJvmOptions; +import net.rptools.maptool.util.*; import net.rptools.parser.ParserException; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; diff --git a/src/main/java/net/rptools/maptool/client/functions/getInfoFunction.java b/src/main/java/net/rptools/maptool/client/functions/getInfoFunction.java index d6ee017d86..d36454ebda 100644 --- a/src/main/java/net/rptools/maptool/client/functions/getInfoFunction.java +++ b/src/main/java/net/rptools/maptool/client/functions/getInfoFunction.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.concurrent.ConcurrentSkipListSet; import javax.swing.*; +import net.rptools.maptool.client.AppConstants; import net.rptools.maptool.client.AppPreferences; import net.rptools.maptool.client.MapTool; import net.rptools.maptool.client.MapToolExpressionParser; @@ -260,7 +261,9 @@ private JsonObject getClientInfo() { ConcurrentSkipListSet registeredOverlays = MapTool.getFrame().getOverlayPanel().getOverlays(); for (HTMLOverlayManager o : registeredOverlays) { - overlays.add(o.getName(), o.getProperties()); + if (!o.getName().startsWith(AppConstants.INTERNAL_FRAME_PREFIX)) { + overlays.add(o.getName(), o.getProperties()); + } } cinfo.add("overlays", overlays); diff --git a/src/main/java/net/rptools/maptool/client/ui/htmlframe/HTMLOverlayPanel.java b/src/main/java/net/rptools/maptool/client/ui/htmlframe/HTMLOverlayPanel.java index f431f7fbe7..27ee49a384 100644 --- a/src/main/java/net/rptools/maptool/client/ui/htmlframe/HTMLOverlayPanel.java +++ b/src/main/java/net/rptools/maptool/client/ui/htmlframe/HTMLOverlayPanel.java @@ -245,7 +245,6 @@ public void showOverlay(String name, int zOrder, String html, Object frameValue) setVisible(true); Platform.runLater( () -> { - boolean needsSorting = false; HTMLOverlayManager overlayManager = getOverlay(name); if (overlayManager != null) { if ("".equals(html)) { @@ -257,7 +256,6 @@ public void showOverlay(String name, int zOrder, String html, Object frameValue) overlays.remove(overlayManager); overlayManager.setZOrder(zOrder); overlays.add(overlayManager); - needsSorting = true; } } else { overlayManager = new HTMLOverlayManager(name, zOrder); @@ -266,12 +264,9 @@ public void showOverlay(String name, int zOrder, String html, Object frameValue) root.getChildren().add(overlayManager.getWebView()); if (!HTMLFrameFactory.isInternalOnly(overlayManager.getName())) { AppMenuBar.addToOverlayMenu(overlayManager); - needsSorting = true; } } - if (needsSorting) { - sortOverlays(); - } + sortOverlays(); overlayManager.updateContents(html, true); if (frameValue != null) { overlayManager.setValue(frameValue); diff --git a/src/main/java/net/rptools/maptool/client/ui/sheet/stats/StatSheet.java b/src/main/java/net/rptools/maptool/client/ui/sheet/stats/StatSheet.java index 331e168acc..15277fce7d 100644 --- a/src/main/java/net/rptools/maptool/client/ui/sheet/stats/StatSheet.java +++ b/src/main/java/net/rptools/maptool/client/ui/sheet/stats/StatSheet.java @@ -59,7 +59,7 @@ public void setContent(Token token, String content, URL entry, StatSheetLocation .getOverlayPanel() .showOverlay( AppConstants.INTERNAL_MAP_UNDER_POINTER_HTML_OVERLAY_NAME, - Integer.MIN_VALUE, + Integer.MAX_VALUE, output, null); } @@ -77,7 +77,9 @@ public void clearContent() { MapTool.getFrame() .getOverlayPanel() .getOverlay(AppConstants.INTERNAL_MAP_UNDER_POINTER_HTML_OVERLAY_NAME); - overlay.updateContents("", true); + if (overlay != null) { + overlay.updateContents("", true); + } }); } }