mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Fixed: keys without save_value caused reader to loop
Fixed: first line of multi line text value could cause warnings about whitespace Fixed some copy/paste errors in choice style reading; Text viewer correctly uses mask for first line git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@604 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -414,6 +414,11 @@ bool TextViewer::prepareLinesScale(RotatedDC& dc, const vector<CharInfo>& chars,
|
||||
line.top = style.padding_top;
|
||||
// size of the line so far
|
||||
RealSize line_size(lineLeft(dc, style, 0), 0);
|
||||
while (line.top < style.height && line_size.width + 1 >= style.width - style.padding_right) {
|
||||
// nothing fits on this line, move down one pixel
|
||||
line.top += 1;
|
||||
line_size.width = lineLeft(dc, style, line.top);
|
||||
}
|
||||
line.positions.push_back(line_size.width);
|
||||
// The word we are currently reading
|
||||
RealSize word_size;
|
||||
@@ -513,7 +518,7 @@ bool TextViewer::prepareLinesScale(RotatedDC& dc, const vector<CharInfo>& chars,
|
||||
while (line.top < style.height && line_size.width + 1 >= style.width - style.padding_right) {
|
||||
// nothing fits on this line, move down one pixel
|
||||
line.top += 1;
|
||||
line_size = RealSize(lineLeft(dc, style, line.top), 0);
|
||||
line_size.width = lineLeft(dc, style, line.top);
|
||||
}
|
||||
line.positions.push_back(line_size.width); // start position
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user