mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-27 15:08:39 +01:00
Zooming Tweaks (for repair work) and Wording changes.
Repair work involves lots of zooming in and out, to use the repair effect on up to 128 samples. Ctrl Mouse-Wheel zooming now will zoom to ends of selection, if available, or mouse position otherwise. Zoom-Toggle hyphen removed and Preset2 changed. Button tooltips tweaked to match menu entries.
This commit is contained in:
@@ -74,22 +74,28 @@ unsigned CommonTrackPanelCell::HandleWheelRotation
|
||||
// Time corresponding to mouse position
|
||||
wxCoord xx;
|
||||
double center_h;
|
||||
if (scrubber.IsScrollScrubbing()) {
|
||||
// Expand or contract about the center, ignoring mouse position
|
||||
double mouse_h = viewInfo.PositionToTime(event.m_x, trackLeftEdge);
|
||||
|
||||
// Scrubbing? Expand or contract about the center, ignoring mouse position
|
||||
if (scrubber.IsScrollScrubbing())
|
||||
center_h = viewInfo.h + (pProject->GetScreenEndTime() - viewInfo.h) / 2.0;
|
||||
xx = viewInfo.TimeToPosition(center_h, trackLeftEdge);
|
||||
}
|
||||
else if( steps > 0 ){
|
||||
// When zooming in, keep the selection start where it was.
|
||||
// This is particularly helpful for a point selection.
|
||||
// Zooming out? Focus on mouse.
|
||||
else if( steps <= 0 )
|
||||
center_h = mouse_h;
|
||||
// No Selection? Focus on mouse.
|
||||
else if( viewInfo.selectedRegion.t1() <= 0.0 )
|
||||
center_h = mouse_h;
|
||||
// Before Selection? Focus on left
|
||||
else if( mouse_h < viewInfo.selectedRegion.t0() )
|
||||
center_h = viewInfo.selectedRegion.t0();
|
||||
xx = viewInfo.TimeToPosition( center_h, trackLeftEdge);
|
||||
}
|
||||
// After Selection? Focus on right
|
||||
else if( mouse_h > viewInfo.selectedRegion.t1() )
|
||||
center_h = viewInfo.selectedRegion.t1();
|
||||
// Inside Selection? Focus on mouse
|
||||
else
|
||||
{
|
||||
xx = event.m_x;
|
||||
center_h = viewInfo.PositionToTime(xx, trackLeftEdge);
|
||||
}
|
||||
center_h = mouse_h;
|
||||
|
||||
xx = viewInfo.TimeToPosition(center_h, trackLeftEdge);
|
||||
|
||||
// Time corresponding to last (most far right) audio.
|
||||
double audioEndTime = pProject->GetTracks()->GetEndTime();
|
||||
|
||||
Reference in New Issue
Block a user