mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-30 15:39:27 +02:00
Fix for ruler elements disappearing at high zoom beyond time 5:57:54.84.
This commit is contained in:
parent
2fa98d3c16
commit
0a53820106
@ -1047,7 +1047,9 @@ void Ruler::Update(TimeTrack* timetrack)// Envelope *speedEnv, long minSpeed, lo
|
||||
// Major ticks
|
||||
double d = mMin - UPP/2;
|
||||
double lastD = d;
|
||||
int majorInt = (int)floor(sg * d / mMajor);
|
||||
// using ints for majorint doesn't work, as
|
||||
// majorint will overflow and be negative at high zoom.
|
||||
double majorInt = floor(sg * d / mMajor);
|
||||
i = -1;
|
||||
while(i <= mLength) {
|
||||
double warpfactor;
|
||||
@ -1060,8 +1062,8 @@ void Ruler::Update(TimeTrack* timetrack)// Envelope *speedEnv, long minSpeed, lo
|
||||
lastD = d;
|
||||
d += UPP/warpfactor;
|
||||
|
||||
if ((int)floor(sg * d / mMajor) > majorInt) {
|
||||
majorInt = (int)floor(sg * d / mMajor);
|
||||
if (floor(sg * d / mMajor) > majorInt) {
|
||||
majorInt = floor(sg * d / mMajor);
|
||||
Tick(i, sg * majorInt * mMajor, true, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user