Nigel Paton - 2009-05-27

Hi,

In mpWindow::Fit() there is the following line:

m_posY = (yMin+yMax)/2 + ((m_scrY - m_marginTop - m_marginBottom)/2 - m_marginTop)/m_scaleY;

(comment at end removed)

This should be:

m_posY = (yMin+yMax)/2 + ((m_scrY - m_marginTop - m_marginBottom)/2 + m_marginTop)/m_scaleY;

(adding m_marginTop not subtracting it)

Otherwise the graph is shifted up. If your top margin is 0 you will not notice this (as per the examples :) )

Cheers

Nigel