From ea914eac9adb5e4450241d2907c2891bf12a63b5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 5 Aug 2022 13:49:01 +0200 Subject: [PATCH] Pcbnew: fix regression: Display board info when clicking on a empty place. Previously: the displayed info was "Selected Items 0". --- pcbnew/tools/pcb_control.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index f9d2377f28..e2b1b6f22e 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -1359,8 +1359,15 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent ) if( msgItems.empty() ) { - msgItems.emplace_back( _( "Selected Items" ), - wxString::Format( wxT( "%d" ), selection.GetSize() ) ); + if( 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 );