diff --git a/src/main/java/net/rptools/maptool/client/ui/campaignproperties/CampaignPropertiesDialog.java b/src/main/java/net/rptools/maptool/client/ui/campaignproperties/CampaignPropertiesDialog.java index 890669fdd9..f968d99e4a 100644 --- a/src/main/java/net/rptools/maptool/client/ui/campaignproperties/CampaignPropertiesDialog.java +++ b/src/main/java/net/rptools/maptool/client/ui/campaignproperties/CampaignPropertiesDialog.java @@ -203,7 +203,6 @@ private void accept() { .forEach( (o, n) -> { campaign.renameTokenTypes(o, n); - System.out.println("Renaming " + o + " to " + n); }); MapTool.getFrame().hideGlassPane(); copyUIToCampaign(); diff --git a/src/main/java/net/rptools/maptool/client/ui/campaignproperties/TokenPropertiesManagementPanel.java b/src/main/java/net/rptools/maptool/client/ui/campaignproperties/TokenPropertiesManagementPanel.java index e3a873ae52..c2e744b88b 100644 --- a/src/main/java/net/rptools/maptool/client/ui/campaignproperties/TokenPropertiesManagementPanel.java +++ b/src/main/java/net/rptools/maptool/client/ui/campaignproperties/TokenPropertiesManagementPanel.java @@ -182,7 +182,6 @@ public void initTypeDeleteButton() { var type = (String) getTokenTypeList().getSelectedValue(); if (type != null) { JPanel renameToPanel = new JPanel(); - // renameToPanel.setLayout(new BoxLayout(renameToPanel, BoxLayout.PAGE_AXIS)); JComboBox types = new JComboBox<>( tokenTypeMap.keySet().stream() @@ -332,6 +331,7 @@ public void initTokenTypeName() { var oldName = (String) ttList.getSelectedValue(); var newName = field.getText(); tokenTypeMap.put(newName, tokenTypeMap.remove(oldName)); + tokenTypeStatSheetMap.put(newName, tokenTypeStatSheetMap.remove(oldName)); ttList.setSelectedValue(newName, true); updateExistingTokenTypes(oldName, newName); } diff --git a/src/main/java/net/rptools/maptool/model/CampaignProperties.java b/src/main/java/net/rptools/maptool/model/CampaignProperties.java index 18e1707555..fc7dbe7fbb 100644 --- a/src/main/java/net/rptools/maptool/model/CampaignProperties.java +++ b/src/main/java/net/rptools/maptool/model/CampaignProperties.java @@ -190,7 +190,11 @@ public StatSheetProperties getTokenTypeDefaultStatSheet(String propertyType) { */ public void setTokenTypeDefaultStatSheet( String propertyType, StatSheetProperties statSheetProperties) { - tokenTypeStatSheetMap.put(propertyType, statSheetProperties); + if (statSheetProperties == null) { + tokenTypeStatSheetMap.remove(propertyType); + } else { + tokenTypeStatSheetMap.put(propertyType, statSheetProperties); + } } public Map getSightTypeMap() {