mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 21:47:00 -04:00
Fix off-by-1 error in per-paragraph alignment
This commit is contained in:
@@ -728,7 +728,7 @@ void TextViewer::alignLines(RotatedDC& dc, const vector<CharInfo>& chars, const
|
|||||||
size_t start = 0;
|
size_t start = 0;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (size_t last = 0 ; last < lines.size() ; ++last) {
|
for (size_t last = 0 ; last < lines.size() ; ++last) {
|
||||||
if (lines[last].break_after != LineBreak::SOFT || last == lines.size()) {
|
if (lines[last].break_after != LineBreak::SOFT || last+1 == lines.size()) {
|
||||||
alignParagraph(start, last + 1, chars, style, RealRect(0, style.padding_top+n*style.paragraph_height, s.width, style.paragraph_height));
|
alignParagraph(start, last + 1, chars, style, RealRect(0, style.padding_top+n*style.paragraph_height, s.width, style.paragraph_height));
|
||||||
start = last + 1;
|
start = last + 1;
|
||||||
++n;
|
++n;
|
||||||
|
|||||||
Reference in New Issue
Block a user