From 08fe4e70fe7a621130cf47e7c75aa8e03017d580 2012-11-26 14:35:35 From: Marek Rosa Date: 2012-11-26 14:35:35 Subject: [PATCH] LogDomain zoomout fix --- diff --git a/src/domain/logxlogydomain.cpp b/src/domain/logxlogydomain.cpp index c7c07d1..32e4a89 100644 --- a/src/domain/logxlogydomain.cpp +++ b/src/domain/logxlogydomain.cpp @@ -93,7 +93,7 @@ void LogXLogYDomain::zoomOut(const QRectF &rect) qreal maxX = qPow(m_logBaseX, newLogMaxX); qreal ratioY = m_size.height()/rect.height(); - qreal newLogMinY = m_logMaxY - (m_logMaxY - m_logMinY) / ratioY; + qreal newLogMinY = m_logMinY - (m_logMaxY - m_logMinY) / ratioY; qreal newLogMaxY = m_logMaxY + (m_logMaxY - m_logMinY) / ratioY; qreal minY = qPow(m_logBaseY, newLogMinY); qreal maxY = qPow(m_logBaseY, newLogMaxY); diff --git a/src/domain/xlogydomain.cpp b/src/domain/xlogydomain.cpp index a0bdb01..0ded403 100644 --- a/src/domain/xlogydomain.cpp +++ b/src/domain/xlogydomain.cpp @@ -91,7 +91,7 @@ void XLogYDomain::zoomOut(const QRectF &rect) maxX = minX + dx * m_size.width(); qreal ratioY = m_size.height()/rect.height(); - qreal newLogMinY = m_logMaxY - (m_logMaxY - m_logMinY) / ratioY; + qreal newLogMinY = m_logMinY - (m_logMaxY - m_logMinY) / ratioY; qreal newLogMaxY = m_logMaxY + (m_logMaxY - m_logMinY) / ratioY; qreal minY = qPow(m_logBaseY, newLogMinY); qreal maxY = qPow(m_logBaseY, newLogMaxY);