1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-19 09:30: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 2caad0f407
commit e0ee34e877

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;
}