Remove shadowing member variable.

Perhaps the compiler always gets this right, but it's still confusing
when reading the code.
This commit is contained in:
Jeff Young 2021-07-29 16:02:25 +01:00
parent 9271ac1a4f
commit 138a965c2a
2 changed files with 12 additions and 12 deletions

View File

@ -118,7 +118,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
m_canvasType = aBackend;
m_aboutTitle = _( "KiCad Footprint Editor" );
m_selLayerBox = nullptr;
m_settings = nullptr;
m_editorSettings = nullptr;
// Give an icon
wxIcon icon;
@ -255,13 +255,13 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
FinishAUIInitialization();
if( m_settings->m_LibWidth > 0 )
if( m_editorSettings->m_LibWidth > 0 )
{
wxAuiPaneInfo& treePane = m_auimgr.GetPane( "Footprints" );
// wxAUI hack: force width by setting MinSize() and then Fixed()
// thanks to ZenJu http://trac.wxwidgets.org/ticket/13180
treePane.MinSize( m_settings->m_LibWidth, -1 );
treePane.MinSize( m_editorSettings->m_LibWidth, -1 );
treePane.Fixed();
m_auimgr.Update();
@ -505,17 +505,17 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
FOOTPRINT_EDITOR_SETTINGS* FOOTPRINT_EDIT_FRAME::GetSettings()
{
if( !m_settings )
m_settings = Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
if( !m_editorSettings )
m_editorSettings = Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
return m_settings;
return m_editorSettings;
}
APP_SETTINGS_BASE* FOOTPRINT_EDIT_FRAME::config() const
{
return m_settings ? m_settings
: Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
return m_editorSettings ? m_editorSettings
: Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
}

View File

@ -317,10 +317,6 @@ protected:
/// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory.
FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent, EDA_DRAW_PANEL_GAL::GAL_TYPE aBackend );
PCB_LAYER_BOX_SELECTOR* m_selLayerBox; // a combo box to display and select active layer
FOOTPRINT_EDITOR_SETTINGS* m_settings;
/**
* Make sure the footprint info list is loaded (with a progress dialog) and then initialize
* the footprint library tree.
@ -337,6 +333,10 @@ protected:
void setupUIConditions() override;
protected:
PCB_LAYER_BOX_SELECTOR* m_selLayerBox; // a combo box to display and select active layer
FOOTPRINT_EDITOR_SETTINGS* m_editorSettings;
private:
friend struct PCB::IFACE;