diff --git a/eeschema/sch_draw_panel.cpp b/eeschema/sch_draw_panel.cpp index 7a07f981b8..ec7acb4d1d 100644 --- a/eeschema/sch_draw_panel.cpp +++ b/eeschema/sch_draw_panel.cpp @@ -571,6 +571,13 @@ void SCH_DRAW_PANEL::CrossHairOn( wxDC* DC ) m_viewControls->ShowCursor( true ); } + +void SCH_DRAW_PANEL::MoveCursorToCrossHair() +{ + GetViewControls()->WarpCursor( GetParent()->GetCrossHairPosition(), true ); +} + + void SCH_DRAW_PANEL::Refresh( bool aEraseBackground, const wxRect* aRect ) { EDA_DRAW_PANEL_GAL::Refresh( aEraseBackground, aRect ); diff --git a/eeschema/sch_draw_panel.h b/eeschema/sch_draw_panel.h index 7accc1901c..9cb6a1d002 100644 --- a/eeschema/sch_draw_panel.h +++ b/eeschema/sch_draw_panel.h @@ -76,6 +76,8 @@ public: // Show the cross hair. virtual void CrossHairOn( wxDC* DC=nullptr ) override; + virtual void MoveCursorToCrossHair() override; + KIGFX::SCH_VIEW* GetView() const { return view(); } /// @copydoc wxWindow::Refresh()