From 5a655779d7f11829d791713c26f21e9cc154b35f Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 21 May 2019 14:21:53 -0400 Subject: [PATCH] Eeschema: fix broken cursor after mouse wheel pan. Fixes lp:1827787 https://bugs.launchpad.net/kicad/+bug/1827787 --- eeschema/sch_draw_panel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eeschema/sch_draw_panel.cpp b/eeschema/sch_draw_panel.cpp index 9528fedae1..9d1fca587a 100644 --- a/eeschema/sch_draw_panel.cpp +++ b/eeschema/sch_draw_panel.cpp @@ -272,11 +272,13 @@ KIGFX::SCH_VIEW* SCH_DRAW_PANEL::view() const return static_cast( m_view ); } + BASE_SCREEN* SCH_DRAW_PANEL::GetScreen() { return GetParent()->GetScreen(); } + EDA_DRAW_FRAME* SCH_DRAW_PANEL::GetParent() const { return static_cast(m_parent); // static_cast (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 );