Skip to content

Commit 878292a

Browse files
committed
fix repeat text position and size
1 parent 8f71037 commit 878292a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sources/xsheetpreviewarea.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1678,6 +1678,9 @@ void XSheetPDFTemplate::drawXsheetContents(QPainter& painter, int framePage,
16781678
} // 次の 描画フレーム f へ
16791679

16801680
// 「止メ」「リピート」表示。
1681+
QFont font = painter.font();
1682+
font.setPixelSize(param(RowHeight) - mm2px(1));
1683+
painter.setFont(font);
16811684
for (auto repeatInfo : repeatInfos) {
16821685
int repeatStartFrame =
16831686
repeatInfo.repeatChunkStartFrame + repeatInfo.repeatChunkLength;
@@ -1698,7 +1701,7 @@ void XSheetPDFTemplate::drawXsheetContents(QPainter& painter, int framePage,
16981701
.boundingRect(QRect(0, 0, mm2px(100), mm2px(100)),
16991702
Qt::AlignTop | Qt::AlignLeft, holdTxt);
17001703
int drawTxtFrame = (isRepeat) ? repeatStartFrame + 1 : repeatStartFrame;
1701-
int oc = occupiedColumns[c][0];
1704+
int oc = occupiedColumns[c][repeatStartFrame - startFrame];
17021705
QRect rect = m_cellRects[dispArea][oc][drawTxtFrame];
17031706
boundingRect.moveCenter(
17041707
QPoint(rect.center().x(), rect.top() + boundingRect.height() / 2));

0 commit comments

Comments
 (0)