mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Add "undo" for ASS style changes
This commit is contained in:
parent
ee78090499
commit
f52895fc51
@ -221,6 +221,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
fileModified = _history[index].FileModified;
|
||||
originalSubtitle = new Subtitle(_history[index].OriginalSubtitle);
|
||||
originalSubtitleFileName = _history[index].OriginalSubtitleFileName;
|
||||
Header = _history[index].Subtitle.Header;
|
||||
|
||||
return FileName;
|
||||
}
|
||||
|
@ -19724,6 +19724,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
styles = new SubStationAlphaStyles(_subtitle, format);
|
||||
if (styles.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
if (_subtitle.Header != styles.Header)
|
||||
{
|
||||
MakeHistoryForUndo(styles.Text);
|
||||
}
|
||||
|
||||
_subtitle.Header = styles.Header;
|
||||
var styleList = AdvancedSubStationAlpha.GetStylesFromHeader(_subtitle.Header);
|
||||
if (styleList.Count > 0)
|
||||
@ -19745,6 +19750,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
styles = new TimedTextStyles(_subtitle);
|
||||
if (styles.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
if (_subtitle.Header != styles.Header)
|
||||
{
|
||||
MakeHistoryForUndo(styles.Text);
|
||||
}
|
||||
_subtitle.Header = styles.Header;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user