Make the delete tool use KICURSOR
This commit is contained in:
parent
00fea5006e
commit
f820dc990e
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<CLICK_HANDLER> m_clickHandler;
|
||||
OPT<MOTION_HANDLER> m_motionHandler;
|
||||
|
|
Loading…
Reference in New Issue