diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index 89e7f04379..5e1fce93ca 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -707,7 +707,7 @@ void CVPCB_MAINFRAME::DisplayStatus() msg << wxT( ": " ) << m_footprintListBox->GetCount(); - m_statusLine1->SetLabel( msg ); + SetStatusText( msg ); msg.Empty(); @@ -722,7 +722,7 @@ void CVPCB_MAINFRAME::DisplayStatus() module->GetKeywords() ); } - m_statusLine2->SetLabel( msg ); + SetStatusText( msg, 1 ); } @@ -943,7 +943,8 @@ DISPLAY_FOOTPRINTS_FRAME* CVPCB_MAINFRAME::GetFootprintViewerFrame() ( wxWindow::FindWindowByName( FOOTPRINTVIEWER_FRAME_NAME ) ); } -const wxString CVPCB_MAINFRAME::GetSelectedFootprint() + +wxString CVPCB_MAINFRAME::GetSelectedFootprint() { // returns the LIB_ID of the selected footprint in footprint listview // or a empty string @@ -951,6 +952,17 @@ const wxString CVPCB_MAINFRAME::GetSelectedFootprint() } +void CVPCB_MAINFRAME::SetStatusText( const wxString& aText, int aNumber ) +{ + wxASSERT( aNumber < 2 ); + + if( aNumber == 1 ) + m_statusLine2->SetLabel( aText ); + else + m_statusLine1->SetLabel( aText ); +} + + void CVPCB_MAINFRAME::OnConfigurePaths( wxCommandEvent& aEvent ) { Pgm().ConfigurePaths( this ); @@ -981,7 +993,7 @@ void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) break; case MAIL_STATUS: - m_statusLine2->SetLabel( payload ); + SetStatusText( payload, 1 ); break; default: diff --git a/cvpcb/cvpcb_mainframe.h b/cvpcb/cvpcb_mainframe.h index 74b37e2086..5d0deeb521 100644 --- a/cvpcb/cvpcb_mainframe.h +++ b/cvpcb/cvpcb_mainframe.h @@ -293,7 +293,9 @@ public: * @return the LIB_ID of the selected footprint in footprint listview * or a empty string if no selection */ - const wxString GetSelectedFootprint(); + wxString GetSelectedFootprint(); + + void SetStatusText( const wxString& aText, int aNumber = 0 ) override; private: // UI event handlers.