Skip to content

Commit

Permalink
Merge pull request #4887 from Jmr3366/my-fix-branch
Browse files Browse the repository at this point in the history
hasLightSource & Campaign Panel drag-drop bug fix
  • Loading branch information
cwisniew authored Sep 8, 2024
2 parents 14973c0 + 93b36e9 commit c1120a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public static boolean hasLightSource(Token token, String category, String name)
return true;
}
}
return false;
}
}
if (lightSourcesMap.containsKey(category)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ public void drop(DropTargetDropEvent event) {
MacroButtonProperties oldMacroProps = new MacroButtonProperties(tempProperties);

// stops players from moving macros into/from the Campaign/GM panels
if (!MapTool.getPlayer().isGM()
// debounce first, ignore moves that change nothing
if (tempProperties.getGroup().equals(getMacroGroup())) {
event.dropComplete(false);
} else if (!MapTool.getPlayer().isGM()
&& (panelClass.equals("CampaignPanel")
|| panelClass.equals("GmPanel")
|| (data.panelClass.equals("CampaignPanel")
Expand Down

0 comments on commit c1120a7

Please sign in to comment.