Simulator, plot panel: Honor dragging in Y direction.

Fixes #15914
https://gitlab.com/kicad/code/kicad/-/issues/15914
This commit is contained in:
jean-pierre charras 2023-10-27 08:13:44 +02:00
parent 98cae68ea5
commit 06074d9192
1 changed files with 12 additions and 6 deletions

View File

@ -1601,14 +1601,20 @@ void mpWindow::onMouseMove( wxMouseEvent& event )
m_mouseMClick.x = event.GetX();
m_mouseMClick.y = event.GetY();
double Ax_units = Ax / m_scaleX;
double Ay_units = -Ay / m_scaleY;
if( SetXView( m_posX + Ax_units, m_desiredXmax + Ax_units, m_desiredXmin + Ax_units )
|| SetYView( m_posY + Ay_units, m_desiredYmax + Ay_units, m_desiredYmin + Ay_units ) )
if( Ax )
{
UpdateAll();
double Ax_units = Ax / m_scaleX;
SetXView( m_posX + Ax_units, m_desiredXmax + Ax_units, m_desiredXmin + Ax_units );
}
if( Ay )
{
double Ay_units = -Ay / m_scaleY;
SetYView( m_posY + Ay_units, m_desiredYmax + Ay_units, m_desiredYmin + Ay_units );
}
if( Ax || Ay )
UpdateAll();
}
else if( event.m_leftDown )
{