Skip to content

Commit 952b25a

Browse files
committed
[dotify] Handle break-before="page" after only empty blocks on current page
when some of those blocks have markers.
1 parent 47be106 commit 952b25a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

libs/dotify/dotify.formatter.impl/src/org/daisy/dotify/formatter/impl/page/RowGroupDataSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public RowGroupDataSource getDataSource() {
206206
@Override
207207
protected void newRowGroupSequence(BreakBefore breakBefore, VerticalSpacing vs) {
208208
if (groups!=null) {
209+
// this means ScenarioData.maybeNewRowGroupSequence() did not return true for this block
209210
throw new IllegalStateException();
210211
} else {
211212
groups = new ArrayList<>();

libs/dotify/dotify.formatter.impl/src/org/daisy/dotify/formatter/impl/page/ScenarioData.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,12 @@ float calcSize() {
4343
return size;
4444
}
4545

46-
private boolean isDataEmpty() {
47-
return (dataGroups.isEmpty()||dataGroups.peek().getGroup().isEmpty());
48-
}
49-
5046
protected boolean hasSequence() {
5147
return !dataGroups.isEmpty();
5248
}
5349

5450
protected boolean hasResult() {
55-
return !isDataEmpty();
51+
return !dataGroups.isEmpty();
5652
}
5753

5854
protected void newRowGroupSequence(BreakBefore breakBefore, VerticalSpacing vs) {

0 commit comments

Comments
 (0)