mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-28 06:52:35 +01:00
Working on fixing ebu justification, so option from save dialog is actually working... #1833
This commit is contained in:
parent
0abd1268d9
commit
a48d4f91a0
@ -602,7 +602,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
tti.VerticalPosition = (byte)startRow; // bottom (vertical)
|
||||
}
|
||||
|
||||
tti.JustificationCode = EbuUiHelper.JustificationCode;
|
||||
tti.JustificationCode = EbuUiHelper.JustificationCode; // use default justification
|
||||
if (p.Text.StartsWith("{\\an1}", StringComparison.Ordinal) || p.Text.StartsWith("{\\an4}", StringComparison.Ordinal) || p.Text.StartsWith("{\\an7}", StringComparison.Ordinal))
|
||||
{
|
||||
tti.JustificationCode = 1; // 01h=left-justified text
|
||||
@ -611,7 +611,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
|
||||
{
|
||||
tti.JustificationCode = 3; // 03h=right-justified
|
||||
}
|
||||
else // If it's not left- or right-justified, it's centred.
|
||||
else if (p.Text.StartsWith("{\\an2}", StringComparison.Ordinal) || p.Text.StartsWith("{\\an5}", StringComparison.Ordinal) || p.Text.StartsWith("{\\an8}", StringComparison.Ordinal))
|
||||
{
|
||||
tti.JustificationCode = 2; // 02h=centred text
|
||||
}
|
||||
|
@ -26,7 +26,12 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
using (var saveOptions = new EbuSaveOptions())
|
||||
{
|
||||
saveOptions.Initialize(_header, _justificationCode, _fileName, _subtitle);
|
||||
return saveOptions.ShowDialog() == DialogResult.OK;
|
||||
if (saveOptions.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
_justificationCode = saveOptions.JustificationCode;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user