Better reporting of nets and netclasses.
This commit is contained in:
parent
97fd99ec99
commit
8b1ffca7fa
|
@ -1520,10 +1520,14 @@ int BOARD_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
|
||||
canvas()->ForceRefresh();
|
||||
m_frame->UpdateMsgPanel();
|
||||
} );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
board()->SynchronizeNetsAndNetClasses( false );
|
||||
m_frame->UpdateMsgPanel();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1506,6 +1506,27 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
msgItems.emplace_back( _( "Selected Items" ),
|
||||
wxString::Format( wxT( "%d" ), selection.GetSize() ) );
|
||||
|
||||
std::set<wxString> netNames;
|
||||
std::set<wxString> netClasses;
|
||||
|
||||
for( EDA_ITEM* item : selection )
|
||||
{
|
||||
if( BOARD_CONNECTED_ITEM* bci = dynamic_cast<BOARD_CONNECTED_ITEM*>( item ) )
|
||||
{
|
||||
netNames.insert( UnescapeString( bci->GetNetname() ) );
|
||||
netClasses.insert( UnescapeString( bci->GetEffectiveNetClass()->GetName() ) );
|
||||
|
||||
if( netNames.size() > 1 && netClasses.size() > 1 )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( netNames.size() == 1 )
|
||||
msgItems.emplace_back( _( "Net" ), *netNames.begin() );
|
||||
|
||||
if( netClasses.size() == 1 )
|
||||
msgItems.emplace_back( _( "Resolved Netclass" ), *netClasses.begin() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue