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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user