mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 16:40:07 +02:00
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);
|
Import(fileName);
|
||||||
}
|
}
|
||||||
|
// Bug 2743: Don't zoom with lof.
|
||||||
|
if (!fileName.AfterLast('.').IsSameAs(wxT("lof"), false))
|
||||||
window.ZoomAfterImport(nullptr);
|
window.ZoomAfterImport(nullptr);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -309,6 +309,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
|||||||
wxString targetfile;
|
wxString targetfile;
|
||||||
wxString tokenholder = tok.GetNextToken();
|
wxString tokenholder = tok.GetNextToken();
|
||||||
|
|
||||||
|
|
||||||
if (tokenholder.IsSameAs(wxT("window"), false))
|
if (tokenholder.IsSameAs(wxT("window"), false))
|
||||||
{
|
{
|
||||||
// set any duration/offset factors for last window, as all files were called
|
// set any duration/offset factors for last window, as all files were called
|
||||||
@ -501,7 +502,9 @@ void LOFImportFileHandle::doDurationAndScrollOffset()
|
|||||||
if (!mProject)
|
if (!mProject)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
callScrollOffset = callScrollOffset && (scrollOffset != 0);
|
||||||
bool doSomething = callDurationFactor || callScrollOffset;
|
bool doSomething = callDurationFactor || callScrollOffset;
|
||||||
|
|
||||||
if (callDurationFactor)
|
if (callDurationFactor)
|
||||||
{
|
{
|
||||||
double longestDuration = TrackList::Get( *mProject ).GetEndTime();
|
double longestDuration = TrackList::Get( *mProject ).GetEndTime();
|
||||||
@ -509,7 +512,7 @@ void LOFImportFileHandle::doDurationAndScrollOffset()
|
|||||||
callDurationFactor = false;
|
callDurationFactor = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callScrollOffset && (scrollOffset != 0))
|
if (callScrollOffset)
|
||||||
{
|
{
|
||||||
ProjectWindow::Get( *mProject ).TP_ScrollWindow(scrollOffset);
|
ProjectWindow::Get( *mProject ).TP_ScrollWindow(scrollOffset);
|
||||||
callScrollOffset = false;
|
callScrollOffset = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user