-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record sheet fixes and improvements #1574
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1574 +/- ##
===========================================
+ Coverage 0.52% 0.65% +0.13%
- Complexity 49 64 +15
===========================================
Files 266 266
Lines 30481 30511 +30
Branches 5190 5200 +10
===========================================
+ Hits 160 201 +41
+ Misses 30280 30270 -10
+ Partials 41 40 -1 ☔ View full report in Codecov by Sentry. |
@@ -155,23 +155,23 @@ public static List<PrintRecordSheet> createSheets(List<? extends BTObject> entit | |||
} | |||
} else if (unit instanceof BattleArmor) { | |||
baList.add((BattleArmor) unit); | |||
if (singlePrint || baList.size() > 4) { | |||
if (singlePrint || PrintSmallUnitSheet.fillsSheet(baList, options)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense to add parentheses here. There's only one operator in the new expression, although the code that was here before could have used them.
PrintRecordSheet prs = new PrintSmallUnitSheet(baList, pageCount, options); | ||
pageCount += prs.getPageCount(); | ||
sheets.add(prs); | ||
baList = new ArrayList<>(); | ||
} | ||
} else if (unit instanceof Infantry) { | ||
infList.add((Infantry) unit); | ||
if (singlePrint || infList.size() > (options.showReferenceCharts() ? 2 : 3)) { | ||
if (singlePrint || PrintSmallUnitSheet.fillsSheet(infList, options)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here. Though you probably get the point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. a || b
is fine, it doesn't need to be (a) || (b)
unless a
and b
themselves have some operator in them.
This PR collects several bug fixes and improvements that are somewhat related which I worked on at the same time.