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:
parent
9271ac1a4f
commit
138a965c2a
|
@ -118,7 +118,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||||
m_canvasType = aBackend;
|
m_canvasType = aBackend;
|
||||||
m_aboutTitle = _( "KiCad Footprint Editor" );
|
m_aboutTitle = _( "KiCad Footprint Editor" );
|
||||||
m_selLayerBox = nullptr;
|
m_selLayerBox = nullptr;
|
||||||
m_settings = nullptr;
|
m_editorSettings = nullptr;
|
||||||
|
|
||||||
// Give an icon
|
// Give an icon
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
|
@ -255,13 +255,13 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
|
||||||
|
|
||||||
FinishAUIInitialization();
|
FinishAUIInitialization();
|
||||||
|
|
||||||
if( m_settings->m_LibWidth > 0 )
|
if( m_editorSettings->m_LibWidth > 0 )
|
||||||
{
|
{
|
||||||
wxAuiPaneInfo& treePane = m_auimgr.GetPane( "Footprints" );
|
wxAuiPaneInfo& treePane = m_auimgr.GetPane( "Footprints" );
|
||||||
|
|
||||||
// wxAUI hack: force width by setting MinSize() and then Fixed()
|
// wxAUI hack: force width by setting MinSize() and then Fixed()
|
||||||
// thanks to ZenJu http://trac.wxwidgets.org/ticket/13180
|
// 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();
|
treePane.Fixed();
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
|
@ -505,17 +505,17 @@ void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
|
||||||
|
|
||||||
FOOTPRINT_EDITOR_SETTINGS* FOOTPRINT_EDIT_FRAME::GetSettings()
|
FOOTPRINT_EDITOR_SETTINGS* FOOTPRINT_EDIT_FRAME::GetSettings()
|
||||||
{
|
{
|
||||||
if( !m_settings )
|
if( !m_editorSettings )
|
||||||
m_settings = Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
m_editorSettings = Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
||||||
|
|
||||||
return m_settings;
|
return m_editorSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
APP_SETTINGS_BASE* FOOTPRINT_EDIT_FRAME::config() const
|
APP_SETTINGS_BASE* FOOTPRINT_EDIT_FRAME::config() const
|
||||||
{
|
{
|
||||||
return m_settings ? m_settings
|
return m_editorSettings ? m_editorSettings
|
||||||
: Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
: Pgm().GetSettingsManager().GetAppSettings<FOOTPRINT_EDITOR_SETTINGS>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -317,10 +317,6 @@ protected:
|
||||||
/// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory.
|
/// 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 );
|
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
|
* Make sure the footprint info list is loaded (with a progress dialog) and then initialize
|
||||||
* the footprint library tree.
|
* the footprint library tree.
|
||||||
|
@ -337,6 +333,10 @@ protected:
|
||||||
|
|
||||||
void setupUIConditions() override;
|
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:
|
private:
|
||||||
friend struct PCB::IFACE;
|
friend struct PCB::IFACE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue