Pcbnew: fix regression: Display board info when clicking on a empty place.

Previously: the displayed info was "Selected Items 0".
This commit is contained in:
jean-pierre charras 2022-08-05 13:49:01 +02:00
parent 47d63c6806
commit ea914eac9a
1 changed files with 9 additions and 2 deletions

View File

@ -1359,8 +1359,15 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
if( msgItems.empty() ) if( msgItems.empty() )
{ {
msgItems.emplace_back( _( "Selected Items" ), if( selection.GetSize() )
wxString::Format( wxT( "%d" ), selection.GetSize() ) ); {
msgItems.emplace_back( _( "Selected Items" ),
wxString::Format( wxT( "%d" ), selection.GetSize() ) );
}
else
{
m_frame->GetBoard()->GetMsgPanelInfo( m_frame, msgItems );
}
} }
m_frame->SetMsgPanel( msgItems ); m_frame->SetMsgPanel( msgItems );