cvpcb: Overridden SetStatusText() to use m_statusLine{1,2}

Fixes: lp:1763267
* https://bugs.launchpad.net/kicad/+bug/1763267
This commit is contained in:
Maciej Suminski 2018-04-12 13:02:01 +02:00
parent df8bc93e4b
commit f42ca89bb4
2 changed files with 19 additions and 5 deletions

View File

@ -707,7 +707,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
msg << wxT( ": " ) << m_footprintListBox->GetCount(); msg << wxT( ": " ) << m_footprintListBox->GetCount();
m_statusLine1->SetLabel( msg ); SetStatusText( msg );
msg.Empty(); msg.Empty();
@ -722,7 +722,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
module->GetKeywords() ); module->GetKeywords() );
} }
m_statusLine2->SetLabel( msg ); SetStatusText( msg, 1 );
} }
@ -943,7 +943,8 @@ DISPLAY_FOOTPRINTS_FRAME* CVPCB_MAINFRAME::GetFootprintViewerFrame()
( wxWindow::FindWindowByName( FOOTPRINTVIEWER_FRAME_NAME ) ); ( 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 // returns the LIB_ID of the selected footprint in footprint listview
// or a empty string // 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 ) void CVPCB_MAINFRAME::OnConfigurePaths( wxCommandEvent& aEvent )
{ {
Pgm().ConfigurePaths( this ); Pgm().ConfigurePaths( this );
@ -981,7 +993,7 @@ void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
break; break;
case MAIL_STATUS: case MAIL_STATUS:
m_statusLine2->SetLabel( payload ); SetStatusText( payload, 1 );
break; break;
default: default:

View File

@ -293,7 +293,9 @@ public:
* @return the LIB_ID of the selected footprint in footprint listview * @return the LIB_ID of the selected footprint in footprint listview
* or a empty string if no selection * or a empty string if no selection
*/ */
const wxString GetSelectedFootprint(); wxString GetSelectedFootprint();
void SetStatusText( const wxString& aText, int aNumber = 0 ) override;
private: private:
// UI event handlers. // UI event handlers.