Add newly-drawn objects to any entered group.
Fixes https://gitlab.com/kicad/code/kicad/issues/11912
(cherry picked from commit 654740b90d
)
This commit is contained in:
parent
832c689345
commit
e06e65cdde
|
@ -165,6 +165,9 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
|
|||
{
|
||||
case CHT_ADD:
|
||||
{
|
||||
if( selTool->GetEnteredGroup() && !boardItem->GetParentGroup() )
|
||||
selTool->GetEnteredGroup()->AddItem( boardItem );
|
||||
|
||||
if( m_isFootprintEditor )
|
||||
{
|
||||
// footprints inside footprints are not supported yet
|
||||
|
|
|
@ -995,6 +995,9 @@ int PCB_CONTROL::placeBoardItems( std::vector<BOARD_ITEM*>& aItems, bool aIsNew,
|
|||
{
|
||||
const_cast<KIID&>( item->m_Uuid ) = KIID();
|
||||
|
||||
// Even though BOARD_COMMIT::Push() will add any new items to the group, we're
|
||||
// going to run PCB_ACTIONS::move first, and the move tool will throw out any
|
||||
// items that aren't in the entered group.
|
||||
if( selectionTool->GetEnteredGroup() && !item->GetParentGroup() )
|
||||
selectionTool->GetEnteredGroup()->AddItem( item );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue