1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 14:13:32 +02:00

Accessors to get the project window...

... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
This commit is contained in:
Paul Licameli
2019-05-28 13:12:56 -04:00
parent 02afcbca8c
commit 82663892dc
49 changed files with 451 additions and 296 deletions

View File

@@ -472,13 +472,13 @@ void LOFImportFileHandle::doDurationAndScrollOffset()
if (callDurationFactor)
{
double longestDuration = TrackList::Get( *mProject ).GetEndTime();
mProject->ZoomBy(longestDuration / durationFactor);
ProjectWindow::Get( *mProject ).ZoomBy(longestDuration / durationFactor);
callDurationFactor = false;
}
if (callScrollOffset && (scrollOffset != 0))
{
mProject->TP_ScrollWindow(scrollOffset);
ProjectWindow::Get( *mProject ).TP_ScrollWindow(scrollOffset);
callScrollOffset = false;
}