1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-19 09:01:15 +02:00

Remove Get/Set functions for selection bounds from AudacityProject

This commit is contained in:
Paul Licameli
2019-03-27 04:15:28 -04:00
parent 7766d9a192
commit 4018b191b4
13 changed files with 58 additions and 56 deletions

View File

@@ -102,6 +102,7 @@ bool SelectTimeCommand::Apply(const CommandContext & context){
double t0;
double t1;
const auto &selectedRegion = p->GetViewInfo().selectedRegion;
switch( bHasRelativeSpec ? mRelativeTo : 0 ){
default:
case 0: //project start
@@ -117,16 +118,16 @@ bool SelectTimeCommand::Apply(const CommandContext & context){
t1 = end - mT1;
break;
case 3: //selection start
t0 = mT0 + p->GetSel0();
t1 = mT1 + p->GetSel0();
t0 = mT0 + selectedRegion.t0();
t1 = mT1 + selectedRegion.t0();
break;
case 4: //selection
t0 = mT0 + p->GetSel0();
t1 = mT1 + p->GetSel1();
t0 = mT0 + selectedRegion.t0();
t1 = mT1 + selectedRegion.t1();
break;
case 5: //selection end
t0 = p->GetSel1() - mT0;
t1 = p->GetSel1() - mT1;
t0 = selectedRegion.t1() - mT0;
t1 = selectedRegion.t1() - mT1;
break;
}