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

Implement selection from ends of tracks.

This commit is contained in:
James Crook 2018-02-10 16:43:44 +00:00 committed by Paul Licameli
parent 99e18a8896
commit 85c36fe7fe

View File

@ -54,6 +54,11 @@ void SelectTimeCommand::PopulateOrExchange(ShuttleGui & S)
}
bool SelectTimeCommand::Apply(const CommandContext & context){
if( mFromEnd ){
double TEnd = context.GetProject()->GetTracks()->GetEndTime();
context.GetProject()->mViewInfo.selectedRegion.setTimes(TEnd - mT0, TEnd - mT1);
return true;
}
context.GetProject()->mViewInfo.selectedRegion.setTimes(mT0, mT1);
return true;
}