Fix graphic snapping
If the user has requested the ability to snap to graphics, we want to add any of the graphical layers to the limit list
This commit is contained in:
parent
c3b9c65fd6
commit
2cf4cb937f
|
@ -734,6 +734,19 @@ EDA_RECT FOOTPRINT::GetFpPadsLocalBbox() const
|
|||
}
|
||||
|
||||
|
||||
LSET FOOTPRINT::GetLayerSet() const
|
||||
{
|
||||
LSET retval;
|
||||
|
||||
RunOnChildren( [&retval]( BOARD_ITEM* aItem )
|
||||
{
|
||||
retval |= aItem->GetLayerSet();
|
||||
} );
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
const EDA_RECT FOOTPRINT::GetBoundingBox() const
|
||||
{
|
||||
return GetBoundingBox( true, true );
|
||||
|
|
|
@ -166,6 +166,8 @@ public:
|
|||
const EDA_RECT GetBoundingBox() const override;
|
||||
const EDA_RECT GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ) const;
|
||||
|
||||
LSET GetLayerSet() const override;
|
||||
|
||||
PADS& Pads() { return m_pads; }
|
||||
const PADS& Pads() const { return m_pads; }
|
||||
|
||||
|
|
|
@ -756,6 +756,10 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference, bool aRe
|
|||
LSET item_layers = selection.GetSelectionLayers();
|
||||
bool is_hover = selection.IsHover(); // N.B. This must be saved before the second call
|
||||
// to RequestSelection() below
|
||||
|
||||
if( editFrame->GetMagneticItemsSettings()->graphics )
|
||||
item_layers |= LSET::UserDefinedLayers() | LSET::UserMask();
|
||||
|
||||
VECTOR2I pickedReferencePoint;
|
||||
|
||||
// Now filter out pads if not in free pads mode. We cannot do this in the first
|
||||
|
|
Loading…
Reference in New Issue