mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Drag'n'drop sub on main window - only hide prev sub just before loading - thx Jamakmake :)
This commit is contained in:
parent
01f65e13e4
commit
9cb7869fb5
@ -2940,6 +2940,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
if (format != null)
|
||||
{
|
||||
RemoveAlternate(true, false);
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Extra);
|
||||
|
||||
new BookmarkPersistence(_subtitle, fileName).Load();
|
||||
|
||||
if (Configuration.Settings.General.RemoveBlankLinesWhenOpening)
|
||||
@ -12886,12 +12889,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (subtitleList.Count > 1)
|
||||
{
|
||||
ResetSubtitle();
|
||||
using (var subtitleChooser = new MatroskaSubtitleChooser("mkv"))
|
||||
{
|
||||
subtitleChooser.Initialize(subtitleList);
|
||||
if (subtitleChooser.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
ResetSubtitle();
|
||||
if (LoadMatroskaSubtitle(subtitleList[subtitleChooser.SelectedIndex], matroska, false) &&
|
||||
(ext.Equals(".mkv", StringComparison.Ordinal) || ext.Equals(".mks", StringComparison.Ordinal)) &&
|
||||
!Configuration.Settings.General.DisableVideoAutoLoading)
|
||||
@ -12922,14 +12925,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var mp4SubtitleTracks = mp4Parser.GetSubtitleTracks();
|
||||
if (mp4SubtitleTracks.Count > 0)
|
||||
{
|
||||
ResetSubtitle();
|
||||
ImportSubtitleFromMp4(fileName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (ext == ".vob" || ext == ".ifo")
|
||||
{
|
||||
ResetSubtitle();
|
||||
ImportDvdSubtitle(fileName);
|
||||
return;
|
||||
}
|
||||
@ -12938,7 +12939,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var subFileName = fileName.Substring(0, fileName.Length - 3) + "sub";
|
||||
if (File.Exists(subFileName) && FileUtil.IsVobSub(subFileName))
|
||||
{
|
||||
ResetSubtitle();
|
||||
ImportAndOcrVobSubSubtitleNew(subFileName, _loading);
|
||||
return;
|
||||
}
|
||||
@ -12949,7 +12949,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
if (file.Length < Subtitle.MaxFileSize)
|
||||
{
|
||||
ResetSubtitle();
|
||||
if (!OpenFromRecentFiles(fileName))
|
||||
{
|
||||
OpenSubtitle(fileName, null);
|
||||
@ -12957,22 +12956,18 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (file.Length < 150000000 && ext == ".sub" && IsVobSubFile(fileName, true)) // max 150 mb
|
||||
{
|
||||
ResetSubtitle();
|
||||
OpenSubtitle(fileName, null);
|
||||
}
|
||||
else if (file.Length < 250000000 && ext == ".sup" && FileUtil.IsBluRaySup(fileName)) // max 250 mb
|
||||
{
|
||||
ResetSubtitle();
|
||||
OpenSubtitle(fileName, null);
|
||||
}
|
||||
else if ((ext == ".ts" || ext == ".rec" || ext == ".mpg" || ext == ".mpeg") && FileUtil.IsTransportStream(fileName))
|
||||
{
|
||||
ResetSubtitle();
|
||||
OpenSubtitle(fileName, null);
|
||||
}
|
||||
else if ((ext == ".m2ts" || ext == ".ts" || ext == ".mts") && FileUtil.IsM2TransportStream(fileName))
|
||||
{
|
||||
ResetSubtitle();
|
||||
OpenSubtitle(fileName, null);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user