1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-22 06:22:58 +02:00

Fix for bug #887

A little overkill, but low risk since the majority of the source
changed isn't actually used.
This commit is contained in:
Leland Lucius
2015-05-16 17:57:01 -05:00
parent f98d9ce712
commit cbcc78b183
14 changed files with 85 additions and 72 deletions

View File

@@ -59,12 +59,12 @@ bool SelectCommand::Apply(CommandExecutionContext context)
if (mode.IsSameAs(wxT("None")))
{
// select none
context.proj->OnSelectNone();
context.GetProject()->OnSelectNone();
}
else if (mode.IsSameAs(wxT("All")))
{
// select all
context.proj->OnSelectAll();
context.GetProject()->OnSelectAll();
}
else if (mode.IsSameAs(wxT("Range")))
{
@@ -72,14 +72,14 @@ bool SelectCommand::Apply(CommandExecutionContext context)
double t0 = GetDouble(wxT("StartTime"));
double t1 = GetDouble(wxT("EndTime"));
TrackList *tracks = context.proj->GetTracks();
TrackList *tracks = context.GetProject()->GetTracks();
if (t0 < context.proj->GetTracks()->GetMinOffset())
if (t0 < context.GetProject()->GetTracks()->GetMinOffset())
{
Error(wxT("Start time is before start of track!"));
return false;
}
if (t1 > context.proj->GetTracks()->GetEndTime())
if (t1 > context.GetProject()->GetTracks()->GetEndTime())
{
Error(wxT("End time is after end of track!"));
return false;
@@ -90,9 +90,9 @@ bool SelectCommand::Apply(CommandExecutionContext context)
// defaulted, as in the second branch?
// Or should this command take more parameters?
#if 1
context.proj->mViewInfo.selectedRegion.setTimes(t0, t1);
context.GetProject()->mViewInfo.selectedRegion.setTimes(t0, t1);
#else
context.proj->mViewInfo.selectedRegion = SelectedRegion(t0, t1);
context.GetProject()->mViewInfo.selectedRegion = SelectedRegion(t0, t1);
#endif
// select specified tracks
@@ -128,7 +128,7 @@ bool SelectCommand::Apply(CommandExecutionContext context)
else if (mode.IsSameAs(wxT("Name")))
{
wxString name = GetString(wxT("TrackName"));
TrackList *tracks = context.proj->GetTracks();
TrackList *tracks = context.GetProject()->GetTracks();
TrackListIterator iter(tracks);
Track *t = iter.First();
while (t) {