Skip to content

Commit

Permalink
removed init
Browse files Browse the repository at this point in the history
sorting bool served no immediate purpose
  • Loading branch information
Jmr3366 committed Nov 12, 2024
1 parent f9cd9a6 commit cb0c4d8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
2 changes: 0 additions & 2 deletions src/main/java/net/rptools/maptool/client/MapTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,6 @@ private static void initialize() {
chatAutoSave = new ChatAutoSave();
chatAutoSave.setTimeout(AppPreferences.chatAutoSaveTimeInMinutes.get());
AppPreferences.chatAutoSaveTimeInMinutes.onChange(chatAutoSave::setTimeout);
MapTool.getFrame().getOverlayPanel().init();

// TODO: make this more formal when we switch to mina
new ServerHeartBeatThread().start();
Expand Down Expand Up @@ -926,7 +925,6 @@ public static void setCampaign(Campaign campaign, GUID defaultRendererId) {
AssetManager.updateRepositoryList();
MapTool.getFrame().getCampaignPanel().reset();
MapTool.getFrame().getGmPanel().reset();
MapTool.getFrame().getOverlayPanel().init();
UserDefinedMacroFunctions.getInstance().handleCampaignLoadMacroEvent();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebView;
import javax.swing.*;
import net.rptools.maptool.client.AppConstants;
import net.rptools.maptool.client.MapTool;
import net.rptools.maptool.client.swing.MapToolEventQueue;
import net.rptools.maptool.client.swing.SwingUtil;
import net.rptools.maptool.client.tool.DefaultTool;
import net.rptools.maptool.client.tool.Tool;
Expand Down Expand Up @@ -119,20 +117,6 @@ public ConcurrentSkipListSet<HTMLOverlayManager> getOverlays() {
return overlays.clone();
}

public HTMLOverlayManager init() {
MapToolEventQueue.invokeLater(
() -> {
MapTool.getFrame()
.getOverlayPanel()
.showOverlay(
AppConstants.INTERNAL_MAP_UNDER_POINTER_HTML_OVERLAY_NAME,
Integer.MAX_VALUE,
"",
null);
});
return null;
}

/**
* Returns the overlay associated with the name.
*
Expand Down Expand Up @@ -261,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)) {
Expand All @@ -273,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);
Expand All @@ -282,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);
Expand Down

0 comments on commit cb0c4d8

Please sign in to comment.