Make sure grouping commits follow board editor path

This commit is contained in:
Jon Evans 2024-01-23 21:22:23 -05:00
parent 256364aaa1
commit a46d409ec6
1 changed files with 4 additions and 1 deletions

View File

@ -62,7 +62,8 @@ BOARD_COMMIT::BOARD_COMMIT( TOOL_MANAGER* aMgr ) :
m_toolMgr( aMgr ),
m_isBoardEditor( false )
{
if( dynamic_cast<PCB_EDIT_FRAME*>( aMgr->GetToolHolder() ) )
m_isBoardEditor = true;
}
@ -265,6 +266,8 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
if( !m_isBoardEditor )
{
FOOTPRINT* parentFP = board->GetFirstFootprint();
wxCHECK2_MSG( parentFP, continue, "Commit thinks this is footprint editor, but "
"there is no first footprint!" );
parentFP->Add( boardItem );
}
else if( FOOTPRINT* parentFP = boardItem->GetParentFootprint() )