From c736904e39f418a0ccbf8a0256d996f1542b20e2 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand <seth@kipro-pcb.com> Date: Fri, 13 Sep 2024 16:51:16 -0700 Subject: [PATCH] Use arrow not pencil when selecting image The arrow cursor makes better syntactic sense for placing existing items rather than drawing as is the case for other tools Fixes https://gitlab.com/kicad/code/kicad/-/issues/17588 --- eeschema/tools/sch_drawing_tools.cpp | 2 +- pagelayout_editor/tools/pl_drawing_tools.cpp | 12 +++++++++++- pcbnew/tools/drawing_tool.cpp | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 6725b3fba9..9b6be7f191 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -840,7 +840,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) if( image ) m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING ); else - m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL ); + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW ); }; auto cleanup = diff --git a/pagelayout_editor/tools/pl_drawing_tools.cpp b/pagelayout_editor/tools/pl_drawing_tools.cpp index 67c0c88ecb..d69e21a57c 100644 --- a/pagelayout_editor/tools/pl_drawing_tools.cpp +++ b/pagelayout_editor/tools/pl_drawing_tools.cpp @@ -85,8 +85,18 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent ) { if( item ) m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PLACE ); + else if( isText ) + { + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::TEXT ); + } + else if( aEvent.IsAction( &PL_ACTIONS::placeImage ) ) + { + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW ); + } else - m_frame->GetCanvas()->SetCurrentCursor( isText ? KICURSOR::TEXT : KICURSOR::PENCIL ); + { + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL ); + } }; auto cleanup = diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 486cfc0089..214db48450 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -578,7 +578,7 @@ int DRAWING_TOOL::PlaceReferenceImage( const TOOL_EVENT& aEvent ) if( image ) m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING ); else - m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL ); + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW ); }; auto cleanup =