Eeschema: fix broken cursor after mouse wheel pan.
Fixes lp:1827787 https://bugs.launchpad.net/kicad/+bug/1827787
This commit is contained in:
parent
0403437ad0
commit
5a655779d7
|
@ -272,11 +272,13 @@ KIGFX::SCH_VIEW* SCH_DRAW_PANEL::view() const
|
||||||
return static_cast<KIGFX::SCH_VIEW*>( m_view );
|
return static_cast<KIGFX::SCH_VIEW*>( m_view );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BASE_SCREEN* SCH_DRAW_PANEL::GetScreen()
|
BASE_SCREEN* SCH_DRAW_PANEL::GetScreen()
|
||||||
{
|
{
|
||||||
return GetParent()->GetScreen();
|
return GetParent()->GetScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_DRAW_FRAME* SCH_DRAW_PANEL::GetParent() const
|
EDA_DRAW_FRAME* SCH_DRAW_PANEL::GetParent() const
|
||||||
{
|
{
|
||||||
return static_cast<EDA_DRAW_FRAME*>(m_parent); // static_cast<SCH_EDIT_FRAME*> (m_parent);
|
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();
|
m_PanStartEventPosition = event.GetPosition();
|
||||||
|
|
||||||
CrossHairOff( );
|
CrossHairOff( );
|
||||||
SetCurrentCursor( wxCURSOR_SIZING );
|
SetCursor( wxCURSOR_SIZING );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( event.ButtonUp( wxMOUSE_BTN_MIDDLE ) )
|
if( event.ButtonUp( wxMOUSE_BTN_MIDDLE ) )
|
||||||
{
|
{
|
||||||
CrossHairOn();
|
CrossHairOn();
|
||||||
SetDefaultCursor();
|
SetCursor( m_currentCursor );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( event.MiddleIsDown() )
|
if( event.MiddleIsDown() )
|
||||||
|
@ -559,6 +561,7 @@ bool SCH_DRAW_PANEL::OnRightClick( wxMouseEvent& event )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SCH_DRAW_PANEL::CallMouseCapture( wxDC* aDC, const wxPoint& aPosition, bool aErase )
|
void SCH_DRAW_PANEL::CallMouseCapture( wxDC* aDC, const wxPoint& aPosition, bool aErase )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_mouseCaptureCallback != NULL, wxT( "Mouse capture callback not set." ) );
|
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 )
|
void SCH_DRAW_PANEL::CrossHairOff( wxDC* DC )
|
||||||
{
|
{
|
||||||
m_viewControls->ShowCursor( false );
|
m_viewControls->ShowCursor( false );
|
||||||
|
|
Loading…
Reference in New Issue