Fix some places where the margin count wasn't updated when removing ASS2 support

This commit is contained in:
Thomas Goyne 2012-10-11 21:34:14 -07:00
parent afd24913d6
commit 7410e37e07
2 changed files with 3 additions and 4 deletions

View File

@ -165,7 +165,7 @@ AssStyle::AssStyle()
, alignment(2)
, encoding(1)
{
for (int i = 0; i < 4; i++)
for (int i = 0; i < 3; i++)
Margin[i] = 10;
UpdateData();

View File

@ -213,10 +213,9 @@ namespace {
block->TransformCoords(state->margin[LEFT], state->margin[TOP], state->rx, state->ry);
}
for (size_t i = 0; i < 4; ++i)
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);
diag->UpdateText();
diag->ClearBlocks();
}
@ -226,7 +225,7 @@ namespace {
style->shadow_w *= state->ry;
style->spacing *= state->rx;
style->scalex *= state->ar;
for (int i = 0; i < 4; i++)
for (int i = 0; i < 3; i++)
style->Margin[i] = int((style->Margin[i] + state->margin[i]) * (i < 2 ? state->rx : state->ry) + 0.5);
style->UpdateData();
}