Footprint editor items always get added to footprint.
Also fixes an unrelated crash when assuming the current editor is the board editor.
This commit is contained in:
parent
6fca467e2a
commit
d6b39c672e
|
@ -262,7 +262,12 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
|||
|
||||
if( !( changeFlags & CHT_DONE ) )
|
||||
{
|
||||
if( FOOTPRINT* parentFP = boardItem->GetParentFootprint() )
|
||||
if( !m_isBoardEditor )
|
||||
{
|
||||
FOOTPRINT* parentFP = board->GetFirstFootprint();
|
||||
parentFP->Add( boardItem );
|
||||
}
|
||||
else if( FOOTPRINT* parentFP = boardItem->GetParentFootprint() )
|
||||
{
|
||||
parentFP->Add( boardItem );
|
||||
}
|
||||
|
|
|
@ -1651,6 +1651,8 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
|
|||
msgItems.emplace_back( _( "Selected Items" ),
|
||||
wxString::Format( wxT( "%d" ), selection.GetSize() ) );
|
||||
|
||||
if( m_isBoardEditor )
|
||||
{
|
||||
std::set<wxString> netNames;
|
||||
std::set<wxString> netClasses;
|
||||
|
||||
|
@ -1672,6 +1674,7 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
|
|||
if( netClasses.size() == 1 )
|
||||
msgItems.emplace_back( _( "Resolved Netclass" ), *netClasses.begin() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_frame->GetBoard()->GetMsgPanelInfo( m_frame, msgItems );
|
||||
|
|
Loading…
Reference in New Issue