diff --git a/bitmaps_png/cursors/cursor-place.xpm b/bitmaps_png/cursors/cursor-place.xpm new file mode 100644 index 0000000000..bbc0fb357e --- /dev/null +++ b/bitmaps_png/cursors/cursor-place.xpm @@ -0,0 +1,39 @@ +/* XPM */ +static const char * cursor_place_xpm[] = { +"32 32 4 1", +" c None", +"! c black", +"# c white", +"$ c #008000", +"! ", +"!! ", +"!#! ", +"!##! ", +"!###! ", +"!####! ", +"!#####! ", +"!######! ", +"!#######! ", +"!########! ", +"!#########! ", +"!######!!!!! ", +"!######! ", +"!##!!##! ", +"!#! !###! ", +"!! !##! ", +"! !###! ", +" !#! ", +" !! ## ", +" #$$# ", +" #$$# ", +" ###$$### ", +" #$$$$$$$$# ", +" #$$$$$$$$# ", +" ###$$### ", +" #$$# ", +" #$$# ", +" ## ", +" ", +" ", +" ", +" "}; \ No newline at end of file diff --git a/common/cursors.cpp b/common/cursors.cpp index 5d37de30b6..fb7a28a0ff 100644 --- a/common/cursors.cpp +++ b/common/cursors.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -146,7 +147,7 @@ static const std::vector standard_cursors = { nullptr, cursor_text_xpm, { 32, 32 }, - { 7, 10 }, + { 7, 7 }, }, { KICURSOR::MEASURE, @@ -218,7 +219,7 @@ static const std::vector standard_cursors = { nullptr, cursor_component_xpm, { 32, 32 }, - { 7, 10 }, + { 7, 7 }, }, { KICURSOR::SELECT_LASSO, @@ -226,7 +227,7 @@ static const std::vector standard_cursors = { nullptr, cursor_select_lasso_xpm, { 32, 32 }, - { 7, 10 }, + { 7, 7 }, }, { KICURSOR::SELECT_WINDOW, @@ -276,6 +277,14 @@ static const std::vector standard_cursors = { { 32, 32 }, { 7, 7 }, }, + { + KICURSOR::PLACE, + nullptr, + nullptr, + cursor_place_xpm, + { 32, 32 }, + { 1, 1 }, + }, }; diff --git a/eeschema/tools/lib_drawing_tools.cpp b/eeschema/tools/lib_drawing_tools.cpp index 173ae63f98..590df5a109 100644 --- a/eeschema/tools/lib_drawing_tools.cpp +++ b/eeschema/tools/lib_drawing_tools.cpp @@ -94,7 +94,7 @@ int LIB_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) [&]() { if( item ) - m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING ); + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PLACE ); else m_frame->GetCanvas()->SetCurrentCursor( isText ? KICURSOR::TEXT : KICURSOR::PENCIL ); }; diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index b282982f1a..e4db42a488 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -512,7 +512,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) auto setCursor = [&]() { - m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::ARROW ); + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PLACE ); }; // Set initial cursor @@ -836,7 +836,7 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) [&]() { if( item ) - m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING ); + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PLACE ); else if( isText ) m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::TEXT ); else if( isGlobalLabel ) diff --git a/include/cursors.h b/include/cursors.h index 7a1e8ff371..dbe78374c8 100644 --- a/include/cursors.h +++ b/include/cursors.h @@ -58,7 +58,8 @@ enum class KICURSOR LINE_GRAPHIC, LINE_WIRE, LINE_WIRE_ADD, - LABEL_HIER + LABEL_HIER, + PLACE }; /** diff --git a/pagelayout_editor/tools/pl_drawing_tools.cpp b/pagelayout_editor/tools/pl_drawing_tools.cpp index 45a80274fc..0b3c2bdb9f 100644 --- a/pagelayout_editor/tools/pl_drawing_tools.cpp +++ b/pagelayout_editor/tools/pl_drawing_tools.cpp @@ -94,7 +94,7 @@ int PL_DRAWING_TOOLS::PlaceItem( const TOOL_EVENT& aEvent ) [&]() { if( item ) - m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING ); + m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::PLACE ); else m_frame->GetCanvas()->SetCurrentCursor( isText ? KICURSOR::TEXT : KICURSOR::PENCIL ); }; diff --git a/pcbnew/tools/pcb_tool_base.cpp b/pcbnew/tools/pcb_tool_base.cpp index f16ccdc9f8..f8588aa0cb 100644 --- a/pcbnew/tools/pcb_tool_base.cpp +++ b/pcbnew/tools/pcb_tool_base.cpp @@ -82,13 +82,13 @@ void PCB_TOOL_BASE::doInteractiveItemPlacement( const std::string& aTool, if( aOptions & IPO_SINGLE_CLICK ) makeNewItem( controls()->GetCursorPosition() ); - auto setCursor = - [&]() + auto setCursor = + [&]() { if( !newItem ) frame()->GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL ); else - frame()->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING ); + frame()->GetCanvas()->SetCurrentCursor( KICURSOR::PLACE ); }; // Set initial cursor