Skip to content

Commit

Permalink
Merge pull request MegaMek#1627 from pavelbraginskiy/fix-sheets
Browse files Browse the repository at this point in the history
Fix incorrect pilot info box drawing
  • Loading branch information
rjhancock authored Sep 28, 2024
2 parents f0feb13 + 5340ff7 commit fe166d0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions megameklab/src/megameklab/printing/PrintRecordSheet.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,9 @@ private void shadeTableRows() {

private void makeFrameless() {
for (Element e : getElementsByClass(FRAME)) {
hideElement(e.getAttributes().getNamedItem("id").getNodeValue(), options.isFrameless());
if (options.isFrameless()) {
hideElement(e.getAttributes().getNamedItem("id").getNodeValue());

// I have no idea with this loop is necessary
// Hiding a parent should hide its children
// But without it pilot data sneaks onto the sheet
Expand All @@ -281,7 +282,7 @@ private void makeFrameless() {
if (child.getId() == null) {
child.setId(UUID.randomUUID().toString());
}
hideElement(child.getId(), true);
hideElement(child.getId());
}
}
}
Expand Down

0 comments on commit fe166d0

Please sign in to comment.