diff --git a/pcbnew/tools/board_editor_control.cpp b/pcbnew/tools/board_editor_control.cpp index ea58d3388f..11471aa8e0 100644 --- a/pcbnew/tools/board_editor_control.cpp +++ b/pcbnew/tools/board_editor_control.cpp @@ -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; } diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index e445021d34..61e94ab3da 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -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 netNames; + std::set netClasses; + + for( EDA_ITEM* item : selection ) + { + if( BOARD_CONNECTED_ITEM* bci = dynamic_cast( 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 {