Nullptr safety.
(This is a long shot for Sentry KICAD-MV, but you never know....)
(cherry picked from commit a4e8fa96d4
)
This commit is contained in:
parent
29fd0caf58
commit
1dbe8b2a79
|
@ -596,9 +596,12 @@ APP_SETTINGS_BASE* FOOTPRINT_EDIT_FRAME::config() const
|
|||
|
||||
void FOOTPRINT_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||
{
|
||||
// aCfg will be the PCBNEW_SETTINGS
|
||||
// Get our own settings; aCfg will be the PCBNEW_SETTINGS because we're part of the pcbnew
|
||||
// compile unit
|
||||
FOOTPRINT_EDITOR_SETTINGS* cfg = GetSettings();
|
||||
|
||||
if( cfg )
|
||||
{
|
||||
PCB_BASE_FRAME::LoadSettings( cfg );
|
||||
|
||||
GetDesignSettings() = cfg->m_DesignSettings;
|
||||
|
@ -608,6 +611,7 @@ void FOOTPRINT_EDIT_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
|||
|
||||
GetToolManager()->GetTool<PCB_SELECTION_TOOL>()->GetFilter() = cfg->m_SelectionFilter;
|
||||
m_selectionFilterPanel->SetCheckboxesFromFilter( cfg->m_SelectionFilter );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -615,9 +619,12 @@ void FOOTPRINT_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
{
|
||||
GetGalDisplayOptions().m_axesEnabled = true;
|
||||
|
||||
// aCfg will be the PCBNEW_SETTINGS
|
||||
// Get our own settings; aCfg will be the PCBNEW_SETTINGS because we're part of the pcbnew
|
||||
// compile unit
|
||||
FOOTPRINT_EDITOR_SETTINGS* cfg = GetSettings();
|
||||
|
||||
if( cfg )
|
||||
{
|
||||
PCB_BASE_FRAME::SaveSettings( cfg );
|
||||
|
||||
cfg->m_DesignSettings = GetDesignSettings();
|
||||
|
@ -630,6 +637,7 @@ void FOOTPRINT_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
cfg->m_AuiPanels.show_layer_manager = m_show_layer_manager_tools;
|
||||
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
|
||||
cfg->m_AuiPanels.appearance_panel_tab = m_appearancePanel->GetTabIndex();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue