Correctly filter copyable objects for copy hotkey (Fixes lp:1571316)
This commit is contained in:
parent
19fef1e9ba
commit
92a2b2b684
|
@ -575,7 +575,7 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||||
|
|
||||||
if( aItem == NULL )
|
if( aItem == NULL )
|
||||||
{
|
{
|
||||||
aItem = LocateAndShowItem( aPosition, SCH_COLLECTOR::MovableItems );
|
aItem = LocateAndShowItem( aPosition, SCH_COLLECTOR::CopyableItems );
|
||||||
|
|
||||||
if( aItem == NULL )
|
if( aItem == NULL )
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -199,6 +199,16 @@ const KICAD_T SCH_COLLECTOR::OrientableItems[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const KICAD_T SCH_COLLECTOR::CopyableItems[] = {
|
||||||
|
SCH_TEXT_T,
|
||||||
|
SCH_LABEL_T,
|
||||||
|
SCH_GLOBAL_LABEL_T,
|
||||||
|
SCH_HIERARCHICAL_LABEL_T,
|
||||||
|
SCH_COMPONENT_T,
|
||||||
|
EOT
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
SEARCH_RESULT SCH_COLLECTOR::Inspect( EDA_ITEM* aItem, void* aTestData )
|
SEARCH_RESULT SCH_COLLECTOR::Inspect( EDA_ITEM* aItem, void* aTestData )
|
||||||
{
|
{
|
||||||
if( aItem->Type() != LIB_PIN_T && !aItem->HitTest( m_RefPos ) )
|
if( aItem->Type() != LIB_PIN_T && !aItem->HitTest( m_RefPos ) )
|
||||||
|
|
|
@ -112,6 +112,11 @@ public:
|
||||||
*/
|
*/
|
||||||
static const KICAD_T OrientableItems[];
|
static const KICAD_T OrientableItems[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A scan list for schematic items that can be copied/duplicated.
|
||||||
|
*/
|
||||||
|
static const KICAD_T CopyableItems[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor SCH_COLLECTOR
|
* Constructor SCH_COLLECTOR
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue