Bug 2743 - The first use of the "window" command in LOF files is ignored by Audacity
This commit is contained in:
parent
224053f0ff
commit
bef40f0ab9
|
@ -971,7 +971,8 @@ void ProjectFileManager::OpenFile(const FilePath &fileNameArg, bool addtohistory
|
|||
{
|
||||
Import(fileName);
|
||||
}
|
||||
|
||||
// Bug 2743: Don't zoom with lof.
|
||||
if (!fileName.AfterLast('.').IsSameAs(wxT("lof"), false))
|
||||
window.ZoomAfterImport(nullptr);
|
||||
|
||||
return;
|
||||
|
|
|
@ -309,6 +309,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
|||
wxString targetfile;
|
||||
wxString tokenholder = tok.GetNextToken();
|
||||
|
||||
|
||||
if (tokenholder.IsSameAs(wxT("window"), false))
|
||||
{
|
||||
// set any duration/offset factors for last window, as all files were called
|
||||
|
@ -501,7 +502,9 @@ void LOFImportFileHandle::doDurationAndScrollOffset()
|
|||
if (!mProject)
|
||||
return;
|
||||
|
||||
callScrollOffset = callScrollOffset && (scrollOffset != 0);
|
||||
bool doSomething = callDurationFactor || callScrollOffset;
|
||||
|
||||
if (callDurationFactor)
|
||||
{
|
||||
double longestDuration = TrackList::Get( *mProject ).GetEndTime();
|
||||
|
@ -509,7 +512,7 @@ void LOFImportFileHandle::doDurationAndScrollOffset()
|
|||
callDurationFactor = false;
|
||||
}
|
||||
|
||||
if (callScrollOffset && (scrollOffset != 0))
|
||||
if (callScrollOffset)
|
||||
{
|
||||
ProjectWindow::Get( *mProject ).TP_ScrollWindow(scrollOffset);
|
||||
callScrollOffset = false;
|
||||
|
|
Loading…
Reference in New Issue