Eeschema: fix broken cursor after mouse wheel pan.

Fixes lp:1827787

https://bugs.launchpad.net/kicad/+bug/1827787
This commit is contained in:
Wayne Stambaugh 2019-05-21 14:21:53 -04:00
parent 0403437ad0
commit 5a655779d7
1 changed files with 6 additions and 2 deletions

View File

@ -272,11 +272,13 @@ KIGFX::SCH_VIEW* SCH_DRAW_PANEL::view() const
return static_cast<KIGFX::SCH_VIEW*>( m_view );
}
BASE_SCREEN* SCH_DRAW_PANEL::GetScreen()
{
return GetParent()->GetScreen();
}
EDA_DRAW_FRAME* SCH_DRAW_PANEL::GetParent() const
{
return static_cast<EDA_DRAW_FRAME*>(m_parent); // static_cast<SCH_EDIT_FRAME*> (m_parent);
@ -386,13 +388,13 @@ void SCH_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event )
m_PanStartEventPosition = event.GetPosition();
CrossHairOff( );
SetCurrentCursor( wxCURSOR_SIZING );
SetCursor( wxCURSOR_SIZING );
}
if( event.ButtonUp( wxMOUSE_BTN_MIDDLE ) )
{
CrossHairOn();
SetDefaultCursor();
SetCursor( m_currentCursor );
}
if( event.MiddleIsDown() )
@ -559,6 +561,7 @@ bool SCH_DRAW_PANEL::OnRightClick( wxMouseEvent& event )
return true;
}
void SCH_DRAW_PANEL::CallMouseCapture( wxDC* aDC, const wxPoint& aPosition, bool aErase )
{
wxCHECK_RET( m_mouseCaptureCallback != NULL, wxT( "Mouse capture callback not set." ) );
@ -595,6 +598,7 @@ void SCH_DRAW_PANEL::EndMouseCapture( int id, int cursor, const wxString& title,
}
}
void SCH_DRAW_PANEL::CrossHairOff( wxDC* DC )
{
m_viewControls->ShowCursor( false );