1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-09 13:12:17 +01:00

static ViewInfo::Get() and ZoomInfo::Get()...

... not member functions of AudacityProject
This commit is contained in:
Paul Licameli
2019-04-28 06:49:47 -04:00
parent 14ab93a01f
commit b5a57682b6
52 changed files with 450 additions and 306 deletions

View File

@@ -66,6 +66,7 @@
#include "../Menus.h"
#include "../Prefs.h"
#include "../Project.h"
#include "../ViewInfo.h"
#include "../widgets/AButton.h"
#include "../widgets/Meter.h"
#include "../widgets/LinkingHtmlWindow.h"
@@ -617,7 +618,7 @@ int ControlToolBar::PlayPlayRegion(const SelectedRegion &selectedRegion,
if (t1 == t0) {
if (looped) {
const auto &selectedRegion = p->GetViewInfo().selectedRegion;
const auto &selectedRegion = ViewInfo::Get( *p ).selectedRegion;
// play selection if there is one, otherwise
// set start of play region to project start,
// and loop the project from current play position.
@@ -988,7 +989,7 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
const bool appendRecord = (altAppearance == bPreferNewTrack);
if (p) {
const auto &selectedRegion = p->GetViewInfo().selectedRegion;
const auto &selectedRegion = ViewInfo::Get( *p ).selectedRegion;
double t0 = selectedRegion.t0();
double t1 = selectedRegion.t1();
// When no time selection, recording duration is 'unlimited'.