1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 07:40:23 +02:00

Fix off-by-one error...

... Everywhere else, GetLeftOffset() not GetLabelWidth() is used as the origin
in PositionToTime and TimeToPosition.

This only affects two commands in TransportMenus.cpp.  Starting time of
playback may change slightly (by the duration that corresponds to one pixel).

Signed-off-by: Panagiotis Vasilopoulos <hello@alwayslivid.com>
This commit is contained in:
Paul Licameli 2021-08-06 16:45:58 -04:00 committed by Panagiotis Vasilopoulos
parent cbe05d8030
commit be46a473fd
No known key found for this signature in database
GPG Key ID: FD806FDB3B2C5270

View File

@ -744,7 +744,7 @@ void TrackPanel::OnMouseEvent(wxMouseEvent & event)
double TrackPanel::GetMostRecentXPos()
{
return mViewInfo->PositionToTime(
MostRecentXCoord(), mViewInfo->GetLabelWidth());
MostRecentXCoord(), mViewInfo->GetLeftOffset());
}
void TrackPanel::RefreshTrack(Track *trk, bool refreshbacking)