Implement MoveCursorToCrossHair.

This commit is contained in:
Jeff Young 2018-09-05 15:48:05 +01:00
parent cb8e6c0df5
commit 7d5e4de815
2 changed files with 9 additions and 0 deletions

View File

@ -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 );

View File

@ -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()