1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-12 07:36:24 +01:00

Bug1156, fix inconsistencies in mapping pixel heights to track vertical scales

This commit is contained in:
Paul Licameli
2015-08-21 11:04:30 -04:00
parent 49ff3ae78f
commit bc5aed7465
3 changed files with 38 additions and 35 deletions

View File

@@ -241,10 +241,14 @@ public:
case nstErb:
case nstUndertone:
return Iterator
(mType, (mValue1 - mValue0) / nPositions, mValue0, mUnit);
(mType,
nPositions == 1 ? 0 : (mValue1 - mValue0) / (nPositions - 1),
mValue0, mUnit);
case nstLogarithmic:
return Iterator
(mType, exp((mValue1 - mValue0) / nPositions), exp(mValue0), mUnit);
(mType,
nPositions == 1 ? 1 : exp((mValue1 - mValue0) / (nPositions - 1)),
exp(mValue0), mUnit);
}
}