Add COMPONENT cursor

This commit is contained in:
Marek Roszko 2020-10-08 20:52:00 -04:00
parent 6cf4016a64
commit f238d05ead
3 changed files with 12 additions and 2 deletions

View File

@ -26,6 +26,7 @@
#include <cursors.h> #include <cursors.h>
#include <kiplatform/ui.h> #include <kiplatform/ui.h>
#include <cursors/cursor-add.xpm> #include <cursors/cursor-add.xpm>
#include <cursors/cursor-component.xpm>
#include <cursors/cursor-connector.xpm> #include <cursors/cursor-connector.xpm>
#include <cursors/cursor-eraser.xpm> #include <cursors/cursor-eraser.xpm>
#include <cursors/cursor-global-label.xpm> #include <cursors/cursor-global-label.xpm>
@ -213,6 +214,14 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
{ 32, 32 }, { 32, 32 },
{ 7, 10 }, { 7, 10 },
}, },
{
KICURSOR::COMPONENT,
nullptr,
nullptr,
cursor_component_xpm,
{ 32, 32 },
{ 7, 10 },
},
}; };

View File

@ -118,7 +118,7 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent )
auto setCursor = auto setCursor =
[&]() [&]()
{ {
m_frame->GetCanvas()->SetCurrentCursor( component ? KICURSOR::MOVING : KICURSOR::PENCIL ); m_frame->GetCanvas()->SetCurrentCursor( component ? KICURSOR::MOVING : KICURSOR::COMPONENT );
}; };
// Set initial cursor // Set initial cursor

View File

@ -51,7 +51,8 @@ enum class KICURSOR
ZOOM_IN, ZOOM_IN,
ZOOM_OUT, ZOOM_OUT,
NET_LABEL, NET_LABEL,
GLOBAL_LABEL GLOBAL_LABEL,
COMPONENT
}; };
/** /**