Implement MoveCursorToCrossHair.
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user