mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
Improve mouse wheel zooming
Zooming with mouse was virtually unusable before this fix, as the location of interest would move around too much on a zoom in.
This commit is contained in:
parent
0cc9c6bc3b
commit
bf30c6198c
@ -79,6 +79,12 @@ unsigned CommonTrackPanelCell::HandleWheelRotation
|
||||
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.
|
||||
center_h = viewInfo.selectedRegion.t0();
|
||||
xx = viewInfo.TimeToPosition( center_h, trackLeftEdge);
|
||||
}
|
||||
else
|
||||
{
|
||||
xx = event.m_x;
|
||||
|
Loading…
x
Reference in New Issue
Block a user