Show the pencil cursor when placing an item, but it isn't created yet
This commit is contained in:
parent
4b647ba6b1
commit
0d79ada3ec
|
@ -86,6 +86,11 @@ void PCB_TOOL_BASE::doInteractiveItemPlacement( const std::string& aTool,
|
|||
// Main loop: keep receiving events
|
||||
while( TOOL_EVENT* evt = Wait() )
|
||||
{
|
||||
if( !newItem )
|
||||
frame()->GetCanvas()->SetCurrentCursor( wxCURSOR_PENCIL );
|
||||
else
|
||||
frame()->GetCanvas()->SetCurrentCursor( wxCURSOR_ARROW );
|
||||
|
||||
VECTOR2I cursorPos = controls()->GetCursorPosition();
|
||||
aPlacer->m_modifiers = evt->Modifier();
|
||||
|
||||
|
|
|
@ -110,11 +110,22 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Options for placing items interactively.
|
||||
*/
|
||||
enum INTERACTIVE_PLACEMENT_OPTIONS {
|
||||
IPO_ROTATE = 1,
|
||||
IPO_FLIP = 2,
|
||||
IPO_SINGLE_CLICK = 4,
|
||||
IPO_REPEAT = 8
|
||||
/// Handle the rotate action in the loop by calling the item's rotate method
|
||||
IPO_ROTATE = 0x01,
|
||||
|
||||
/// Handle flip action in the loop by calling the item's flip method
|
||||
IPO_FLIP = 0x02,
|
||||
|
||||
/// Create an item immediately on placement starting, otherwise show the pencil cursor
|
||||
/// until the item is created
|
||||
IPO_SINGLE_CLICK = 0x04,
|
||||
|
||||
/// Allow repeat placement of the item
|
||||
IPO_REPEAT = 0x08
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue