Don't try to shift line margins that are 0

This commit is contained in:
Thomas Goyne 2014-05-16 11:59:38 -07:00
parent c78db67cba
commit 32fae528b0

View file

@ -136,8 +136,10 @@ namespace {
for (auto drawing : blocks | agi::of_type<AssDialogueBlockDrawing>())
drawing->text = transform_drawing(drawing->text, 0, 0, state->rx / state->ar, state->ry);
for (size_t i = 0; i < 3; ++i)
diag.Margin[i] = int((diag.Margin[i] + state->margin[i]) * (i < 2 ? state->rx : state->ry) + 0.5);
for (size_t i = 0; i < 3; ++i) {
if (diag.Margin[i])
diag.Margin[i] = int((diag.Margin[i] + state->margin[i]) * (i < 2 ? state->rx : state->ry) + 0.5);
}
diag.UpdateText(blocks);
}