Finish Action: fix context menu for buses
This commit is contained in:
parent
be9c3b08b5
commit
d8c04e4ef2
|
@ -283,7 +283,7 @@ bool EE_SELECTION_TOOL::Init()
|
||||||
menu.AddItem( EE_ACTIONS::drawBus, schEditCondition && EE_CONDITIONS::Empty, 100 );
|
menu.AddItem( EE_ACTIONS::drawBus, schEditCondition && EE_CONDITIONS::Empty, 100 );
|
||||||
|
|
||||||
menu.AddSeparator( 100 );
|
menu.AddSeparator( 100 );
|
||||||
menu.AddItem( ACTIONS::finishInteractive, SCH_LINE_WIRE_BUS_TOOL::IsDrawingWire, 100 );
|
menu.AddItem( ACTIONS::finishInteractive, SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus, 100 );
|
||||||
|
|
||||||
menu.AddSeparator( 200 );
|
menu.AddSeparator( 200 );
|
||||||
menu.AddItem( EE_ACTIONS::selectConnection, connectedSelection && EE_CONDITIONS::Idle, 250 );
|
menu.AddItem( EE_ACTIONS::selectConnection, connectedSelection && EE_CONDITIONS::Idle, 250 );
|
||||||
|
|
|
@ -248,27 +248,6 @@ bool SCH_LINE_WIRE_BUS_TOOL::Init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SCH_LINE_WIRE_BUS_TOOL::IsDrawingLine( const SELECTION& aSelection )
|
|
||||||
{
|
|
||||||
return IsDrawingLineWireOrBus( aSelection )
|
|
||||||
&& aSelection.Front()->IsType( { SCH_ITEM_LOCATE_GRAPHIC_LINE_T } );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool SCH_LINE_WIRE_BUS_TOOL::IsDrawingWire( const SELECTION& aSelection )
|
|
||||||
{
|
|
||||||
return IsDrawingLineWireOrBus( aSelection )
|
|
||||||
&& aSelection.Front()->IsType( { SCH_ITEM_LOCATE_WIRE_T } );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool SCH_LINE_WIRE_BUS_TOOL::IsDrawingBus( const SELECTION& aSelection )
|
|
||||||
{
|
|
||||||
return IsDrawingLineWireOrBus( aSelection )
|
|
||||||
&& aSelection.Front()->IsType( { SCH_ITEM_LOCATE_BUS_T } );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus( const SELECTION& aSelection )
|
bool SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus( const SELECTION& aSelection )
|
||||||
{
|
{
|
||||||
// NOTE: for immediate hotkeys, it is NOT required that the line, wire or bus tool
|
// NOTE: for immediate hotkeys, it is NOT required that the line, wire or bus tool
|
||||||
|
|
|
@ -83,9 +83,6 @@ public:
|
||||||
int UnfoldBus( const TOOL_EVENT& aEvent );
|
int UnfoldBus( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
// SELECTION_CONDITIONs:
|
// SELECTION_CONDITIONs:
|
||||||
static bool IsDrawingLine( const SELECTION& aSelection );
|
|
||||||
static bool IsDrawingWire( const SELECTION& aSelection );
|
|
||||||
static bool IsDrawingBus( const SELECTION& aSelection );
|
|
||||||
static bool IsDrawingLineWireOrBus( const SELECTION& aSelection );
|
static bool IsDrawingLineWireOrBus( const SELECTION& aSelection );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue