simulator: plot curves: fix incorrect draw area limits calculation when zooming.

Fixes: lp:1674132
https://bugs.launchpad.net/kicad/+bug/1674132
This commit is contained in:
jean-pierre charras
2019-09-26 16:30:28 +02:00
parent d862cdaa72
commit 9dd5b6ce37
2 changed files with 31 additions and 15 deletions
+4 -2
View File
@@ -2171,9 +2171,11 @@ void mpWindow::AdjustLimitedView()
if( !m_enableLimitedView )
return;
// m_min and m_max are plot limits for curves
// xMin, xMax, yMin, yMax are the full limits (plot limit + margin)
const double xMin = m_minX - m_marginLeft / m_scaleX;
const double xMax = m_maxX - m_marginRight / m_scaleX;
const double yMin = m_minY + m_marginTop / m_scaleY;
const double xMax = m_maxX + m_marginRight / m_scaleX;
const double yMin = m_minY - m_marginTop / m_scaleY;
const double yMax = m_maxY + m_marginBottom / m_scaleY;
if( m_desiredXmin < xMin )