mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[interactive_curve_view_range] Preserve ratio
Preserve orthonormality when adding margins to a default range. Change-Id: Iaa1da8d36812e2dad1be3894198ee0fabcd3020f
This commit is contained in:
committed by
Émilie Feral
parent
5d9c7b0c1f
commit
f54b15b9c8
@@ -111,6 +111,7 @@ void InteractiveCurveViewRange::setDefault() {
|
||||
|
||||
// Compute the interesting range
|
||||
m_delegate->interestingRanges(this);
|
||||
bool revertToNormalized = isOrthonormal();
|
||||
|
||||
// Add margins
|
||||
float xRange = xMax() - xMin();
|
||||
@@ -121,7 +122,7 @@ void InteractiveCurveViewRange::setDefault() {
|
||||
m_yRange.setMin(m_delegate->addMargin(yMin(), yRange, true, true), k_lowerMaxFloat, k_upperMaxFloat);
|
||||
MemoizedCurveViewRange::protectedSetYMax(m_delegate->addMargin(yMax(), yRange, true, false), k_lowerMaxFloat, k_upperMaxFloat);
|
||||
|
||||
if (!m_delegate->defaultRangeIsNormalized()) {
|
||||
if (!(m_delegate->defaultRangeIsNormalized() || revertToNormalized)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user