diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index 490b1e248f..95fe1746d8 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -456,7 +456,7 @@ int PCBNEW_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent ) // Deactivate other tools; particularly important if another PICKER is currently running Activate(); - picker->SetCursor( wxStockCursor( wxCURSOR_BULLSEYE ) ); + picker->SetCursor( KICURSOR::REMOVE ); picker->SetClickHandler( [this] ( const VECTOR2D& aPosition ) -> bool diff --git a/pcbnew/tools/pcbnew_picker_tool.cpp b/pcbnew/tools/pcbnew_picker_tool.cpp index 1ceee5d136..6fac0af5b2 100644 --- a/pcbnew/tools/pcbnew_picker_tool.cpp +++ b/pcbnew/tools/pcbnew_picker_tool.cpp @@ -53,9 +53,18 @@ int PCBNEW_PICKER_TOOL::Main( const TOOL_EVENT& aEvent ) Activate(); setControls(); + auto setCursor = + [&]() + { + frame->GetCanvas()->SetCurrentCursor( m_cursor ); + }; + + // Set initial cursor + setCursor(); + while( TOOL_EVENT* evt = Wait() ) { - frame->GetCanvas()->SetCursor( m_cursor ); + setCursor(); grid.SetSnap( !evt->Modifier( MD_SHIFT ) ); grid.SetUseGrid( !evt->Modifier( MD_ALT ) ); @@ -171,7 +180,7 @@ void PCBNEW_PICKER_TOOL::setTransitions() void PCBNEW_PICKER_TOOL::reset() { m_layerMask = LSET::AllLayersMask(); - m_cursor = wxStockCursor( wxCURSOR_ARROW ); + m_cursor = KICURSOR::ARROW; m_picked = NULLOPT; m_clickHandler = NULLOPT; diff --git a/pcbnew/tools/pcbnew_picker_tool.h b/pcbnew/tools/pcbnew_picker_tool.h index a82141278b..5f9aa53b42 100644 --- a/pcbnew/tools/pcbnew_picker_tool.h +++ b/pcbnew/tools/pcbnew_picker_tool.h @@ -64,7 +64,7 @@ public: */ inline void SetLayerSet( LSET aLayerSet ) { m_layerMask = aLayerSet; } - inline void SetCursor( const wxCursor& aCursor ) { m_cursor = aCursor; } + inline void SetCursor( KICURSOR aCursor ) { m_cursor = aCursor; } /** * Function SetClickHandler() @@ -120,7 +120,7 @@ private: private: ///> The layer set to use for optional snapping LSET m_layerMask; - wxCursor m_cursor; + KICURSOR m_cursor; OPT m_clickHandler; OPT m_motionHandler;