More dialog closing fixes

This commit is contained in:
Martijn van Berkel (Flitskikker) 2023-06-06 22:27:04 +02:00
parent a8c3d21530
commit 65d2176d4d
2 changed files with 4 additions and 0 deletions

View File

@ -248,12 +248,14 @@ namespace Nikse.SubtitleEdit.Forms.BeautifyTimeCodes
if (checkBoxExtractExactTimeCodes.Checked && _timeCodes.Count == 0) // we check the extract checkbox here, otherwise it should just calculate the time codes based on frame rate
{
MessageBox.Show(this, string.Format(LanguageSettings.Current.BeautifyTimeCodes.NoTimeCodesLoadedError, LanguageSettings.Current.BeautifyTimeCodes.ExtractTimeCodes), LanguageSettings.Current.General.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
DialogResult = DialogResult.None;
return;
}
if (checkBoxSnapToShotChanges.Checked && _shotChanges.Count == 0)
{
MessageBox.Show(this, string.Format(LanguageSettings.Current.BeautifyTimeCodes.NoShotChangesLoadedError, LanguageSettings.Current.BeautifyTimeCodes.ImportShotChanges), LanguageSettings.Current.General.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
DialogResult = DialogResult.None;
return;
}

View File

@ -2,6 +2,7 @@
using Nikse.SubtitleEdit.Logic;
using System;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Forms;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Forms.BeautifyTimeCodes
@ -76,6 +77,7 @@ namespace Nikse.SubtitleEdit.Forms.BeautifyTimeCodes
if (numericUpDownSafeZone.Value < numericUpDownOffset.Value)
{
MessageBox.Show(this, LanguageSettings.Current.BeautifyTimeCodesProfile.OffsetSafeZoneError, LanguageSettings.Current.General.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
DialogResult = DialogResult.None;
return;
}