1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-02 09:54:42 +01:00

Bug1197, yet again: extreme zoom-in behavior, now Mac specific: ...

...fix differing results on Mac by calculating only in double, so that selection
remains centered at extreme zoom-in for long projects (about 20 min.) and
selection after about 15 min.
This commit is contained in:
Paul Licameli
2016-01-28 10:36:48 -05:00
parent 4e335af91f
commit f47cb3d528
4 changed files with 25 additions and 13 deletions

View File

@@ -62,6 +62,10 @@ public:
, bool ignoreFisheye = false
) const;
// This always ignores the fisheye. Use with caution!
// You should prefer to call TimeToPosition twice, for endpoints, and take the difference!
double TimeRangeToPixelWidth(double timeRange) const;
double OffsetTimeByPixels(double time, wxInt64 offset, bool ignoreFisheye = false) const
{
return PositionToTime(offset + TimeToPosition(time, ignoreFisheye), ignoreFisheye);