diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 1af547d5b3..0ef6605957 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -233,6 +233,9 @@ int DRAWING_TOOL::DrawLine( const TOOL_EVENT& aEvent ) while( drawSegment( S_SEGMENT, line, startingPoint ) ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); + if( line ) { if( m_editModules ) @@ -272,6 +275,9 @@ int DRAWING_TOOL::DrawCircle( const TOOL_EVENT& aEvent ) while( drawSegment( S_CIRCLE, circle ) ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); + if( circle ) { if( m_editModules ) @@ -306,6 +312,9 @@ int DRAWING_TOOL::DrawArc( const TOOL_EVENT& aEvent ) while( drawArc( arc ) ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); + if( arc ) { if( m_editModules ) @@ -351,6 +360,8 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); VECTOR2I cursorPos = m_controls->GetCursorPosition(); if( reselect && text ) @@ -532,6 +543,8 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); grid.SetSnap( !evt->Modifier( MD_SHIFT ) ); grid.SetUseGrid( !evt->Modifier( MD_ALT ) ); m_controls->SetSnapping( !evt->Modifier( MD_ALT ) ); @@ -908,6 +921,9 @@ int DRAWING_TOOL::SetAnchor( const TOOL_EVENT& aEvent ) while( OPT_TOOL_EVENT evt = Wait() ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); + if( evt->IsClick( BUT_LEFT ) ) { MODULE* module = (MODULE*) m_frame->GetModel(); @@ -1386,6 +1402,8 @@ int DRAWING_TOOL::drawZone( bool aKeepout, ZONE_MODE aMode ) while( OPT_TOOL_EVENT evt = Wait() ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); LSET layers( m_frame->GetActiveLayer() ); grid.SetSnap( !evt->Modifier( MD_SHIFT ) ); grid.SetUseGrid( !evt->Modifier( MD_ALT ) ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index c9aa312036..69f9cf59f5 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -1328,6 +1328,8 @@ int EDIT_TOOL::MeasureTool( const TOOL_EVENT& aEvent ) while( auto evt = Wait() ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + frame()->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); grid.SetSnap( !evt->Modifier( MD_SHIFT ) ); grid.SetUseGrid( !evt->Modifier( MD_ALT ) ); controls.SetSnapping( !evt->Modifier( MD_ALT ) ); diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index eacc731d8c..051b0ec764 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -453,6 +453,8 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); cursorPos = controls->GetCursorPosition( !evt->Modifier( MD_ALT ) ); if( reselect && module ) @@ -629,6 +631,8 @@ int PCB_EDITOR_CONTROL::PlaceTarget( const TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + // This can be reset by some actions (e.g. Save Board), so ensure it stays set. + m_frame->GetGalCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); cursorPos = controls->GetCursorPosition( !evt->Modifier( MD_ALT ) ); if( TOOL_EVT_UTILS::IsCancelInteractive( *evt ) )