mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-22 07:28:03 +02:00
Fix selection contract left/right commands
problem: The commit 1ccd2678b6985759915fe420c74a094361420dc2 swapped the actions of these two commands. Fix: swap them back to their original actions: Selection contract left: contracts the selection by moving its left hand end to the right. Selection contract right: contracts the selection by moving its right hand end to the left.
This commit is contained in:
parent
0ac3ed8453
commit
122607f180
@ -3651,13 +3651,13 @@ void AudacityProject::OnSelExtendRight(const CommandContext &context)
|
||||
void AudacityProject::OnSelContractLeft(const CommandContext &context)
|
||||
{
|
||||
if( !OnlyHandleKeyUp( context ) )
|
||||
SeekLeftOrRight( DIRECTION_LEFT, SELECTION_CONTRACT );
|
||||
SeekLeftOrRight( DIRECTION_RIGHT, SELECTION_CONTRACT );
|
||||
}
|
||||
|
||||
void AudacityProject::OnSelContractRight(const CommandContext &context)
|
||||
{
|
||||
if( !OnlyHandleKeyUp( context ) )
|
||||
SeekLeftOrRight( DIRECTION_RIGHT, SELECTION_CONTRACT );
|
||||
SeekLeftOrRight( DIRECTION_LEFT, SELECTION_CONTRACT );
|
||||
}
|
||||
|
||||
#include "tracks/ui/TimeShiftHandle.h"
|
||||
@ -9374,7 +9374,8 @@ SelectionOperation operation)
|
||||
mTrackPanel->GetScreenEndTime());
|
||||
|
||||
// Is it t0 or t1 moving?
|
||||
bool bMoveT0 = ( operation == SELECTION_CONTRACT ) ^ ( seekStep < 0 );
|
||||
bool bMoveT0 = (operation == SELECTION_CONTRACT && seekStep > 0) ||
|
||||
(operation == SELECTION_EXTEND && seekStep < 0);
|
||||
// newT is where we want to move to
|
||||
double newT = OffsetTime( bMoveT0 ? t0 : t1, seekStep, timeUnit, snapToTime);
|
||||
// constrain to be in the track/screen limits.
|
||||
|
Loading…
x
Reference in New Issue
Block a user