diff --git a/src/ui/Forms/Assa/SetPosition.cs b/src/ui/Forms/Assa/SetPosition.cs index 246e107f4..c2e508f11 100644 --- a/src/ui/Forms/Assa/SetPosition.cs +++ b/src/ui/Forms/Assa/SetPosition.cs @@ -40,7 +40,7 @@ namespace Nikse.SubtitleEdit.Forms.Assa private int _tempYScaled; private int _xScaled = -1; private int _yScaled = -1; - private double _currentPositionSeconds; + private readonly double _currentPositionSeconds; public SetPosition(Subtitle subtitle, int[] selectedIndices, string videoFileName, VideoInfo videoInfo, double currentPositionSeconds) { diff --git a/src/ui/Forms/Assa/TagHistory.cs b/src/ui/Forms/Assa/TagHistory.cs index 7489916c7..57ea49f63 100644 --- a/src/ui/Forms/Assa/TagHistory.cs +++ b/src/ui/Forms/Assa/TagHistory.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; + on using System.Collections.Generic; using System.Linq; using Nikse.SubtitleEdit.Core.Common; using Nikse.SubtitleEdit.Logic; diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index c6331de4b..6de5148b2 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -35194,6 +35194,11 @@ namespace Nikse.SubtitleEdit.Forms private void ApplyCustomStylesToolStripMenuItemClick(object sender, EventArgs e) { + if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha)) + { + return; + } + using (var form = new ApplyCustomStyles(_subtitle, SubtitleListview1.GetSelectedIndices())) { if (form.ShowDialog(this) != DialogResult.OK) @@ -35212,13 +35217,17 @@ namespace Nikse.SubtitleEdit.Forms private void SetPositionToolStripMenuItemClick(object sender, EventArgs e) { + if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha)) + { + return; + } + if (string.IsNullOrEmpty(_videoFileName)) { MessageBox.Show(LanguageSettings.Current.General.NoVideoLoaded); return; } - using (var form = new SetPosition(_subtitle, SubtitleListview1.GetSelectedIndices(), _videoFileName, _videoInfo, mediaPlayer.CurrentPosition)) { var result = form.ShowDialog(this); @@ -35434,6 +35443,12 @@ namespace Nikse.SubtitleEdit.Forms private void ProgressBarToolStripMenuItemClick(object sender, EventArgs e) { + if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha)) + { + return; + } + + if (string.IsNullOrEmpty(_videoFileName) || _videoInfo == null || _videoInfo.Width == 0 || _videoInfo.Height == 0) { MessageBox.Show(LanguageSettings.Current.General.NoVideoLoaded); @@ -35463,6 +35478,11 @@ namespace Nikse.SubtitleEdit.Forms private void ShowAssaResolutionChanger(bool showNeverButton) { + if (GetCurrentSubtitleFormat().GetType() != typeof(AdvancedSubStationAlpha)) + { + return; + } + using (var form = new ResolutionResampler(_subtitle, _videoFileName, _videoInfo, showNeverButton)) { var result = form.ShowDialog(this);