Browse Source

Rename method for consistency with similar class

FOOTPRINT_PREVIEW_PANEL::AddToPanel -> InstallOnPanel
pull/3/merge
Chris Pavlina 9 years ago
parent
commit
3d88cc2a36
  1. 6
      common/widgets/footprint_preview_panel.cpp
  2. 3
      eeschema/dialogs/dialog_choose_component.cpp
  3. 4
      include/widgets/footprint_preview_panel.h

6
common/widgets/footprint_preview_panel.cpp

@ -23,8 +23,8 @@
#include <kiway.h>
FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::AddToPanel(
KIWAY& aKiway, wxPanel* aPanel, bool aIndicator )
FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::InstallOnPanel(
KIWAY& aKiway, wxPanel* aPanel, bool aStatus )
{
FOOTPRINT_PREVIEW_PANEL* fpp = NULL;
@ -43,7 +43,7 @@ FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::AddToPanel(
auto sizer = new wxBoxSizer( wxVERTICAL );
sizer->Add( fpp, 1, wxALL | wxEXPAND, 0 );
if( aIndicator )
if( aStatus )
{
auto label = new wxStaticText( aPanel, -1, wxEmptyString );
auto sizer2 = new wxBoxSizer( wxVERTICAL );

3
eeschema/dialogs/dialog_choose_component.cpp

@ -55,7 +55,8 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( SCH_BASE_FRAME* aParent, const
m_footprintPreviewPanel = NULL;
// Initialize footprint preview through Kiway
m_footprintPreviewPanel = FOOTPRINT_PREVIEW_PANEL::AddToPanel( Kiway(), m_footprintView, true );
m_footprintPreviewPanel =
FOOTPRINT_PREVIEW_PANEL::InstallOnPanel( Kiway(), m_footprintView, true );
if( m_footprintPreviewPanel )
{

4
include/widgets/footprint_preview_panel.h

@ -98,9 +98,9 @@ public:
*
* @param aKiway - an active Kiway instance
* @param aPanel - a blank panel to receive the previewer
* @param aIndicator - if true, also add indicator elements to display status and errors.
* @param aStatus - if true, also add indicator elements to display status and errors.
*/
static FOOTPRINT_PREVIEW_PANEL* AddToPanel( KIWAY& aKiway, wxPanel* aPanel, bool aIndicator );
static FOOTPRINT_PREVIEW_PANEL* InstallOnPanel( KIWAY& aKiway, wxPanel* aPanel, bool aStatus );
protected:

Loading…
Cancel
Save