Tidy up shutdown of APPEARANCE_CONTROLS.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15024
(cherry picked from commit c2c71facb1
)
This commit is contained in:
parent
c895816cb0
commit
4eb9281f4d
|
@ -1282,6 +1282,9 @@ void PCB_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
cfg->m_AuiPanels.search_panel_height = m_searchPane->GetSize().y;
|
cfg->m_AuiPanels.search_panel_height = m_searchPane->GetSize().y;
|
||||||
cfg->m_AuiPanels.search_panel_width = m_searchPane->GetSize().x;
|
cfg->m_AuiPanels.search_panel_width = m_searchPane->GetSize().x;
|
||||||
cfg->m_AuiPanels.search_panel_dock_direction = searchPaneInfo.dock_direction;
|
cfg->m_AuiPanels.search_panel_dock_direction = searchPaneInfo.dock_direction;
|
||||||
|
|
||||||
|
if( m_appearancePanel )
|
||||||
|
m_appearancePanel->SaveSettings( cfg );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -596,15 +596,17 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
|
||||||
|
|
||||||
APPEARANCE_CONTROLS::~APPEARANCE_CONTROLS()
|
APPEARANCE_CONTROLS::~APPEARANCE_CONTROLS()
|
||||||
{
|
{
|
||||||
PCBNEW_SETTINGS* settings = m_frame->GetPcbNewSettings();
|
|
||||||
|
|
||||||
settings->m_AuiPanels.appearance_expand_layer_display = m_paneLayerDisplayOptions->IsExpanded();
|
|
||||||
settings->m_AuiPanels.appearance_expand_net_display = m_paneNetDisplayOptions->IsExpanded();
|
|
||||||
|
|
||||||
delete m_iconProvider;
|
delete m_iconProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void APPEARANCE_CONTROLS::SaveSettings( PCBNEW_SETTINGS* aCfg )
|
||||||
|
{
|
||||||
|
aCfg->m_AuiPanels.appearance_expand_layer_display = m_paneLayerDisplayOptions->IsExpanded();
|
||||||
|
aCfg->m_AuiPanels.appearance_expand_net_display = m_paneNetDisplayOptions->IsExpanded();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void APPEARANCE_CONTROLS::createControls()
|
void APPEARANCE_CONTROLS::createControls()
|
||||||
{
|
{
|
||||||
int hotkey;
|
int hotkey;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
|
* Copyright (C) 2020 Jon Evans <jon@craftyjon.com>
|
||||||
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
@ -34,6 +34,7 @@ class BITMAP_TOGGLE;
|
||||||
class COLOR_SWATCH;
|
class COLOR_SWATCH;
|
||||||
class INDICATOR_ICON;
|
class INDICATOR_ICON;
|
||||||
class PCB_BASE_FRAME;
|
class PCB_BASE_FRAME;
|
||||||
|
class PCBNEW_SETTINGS;
|
||||||
class ROW_ICON_PROVIDER;
|
class ROW_ICON_PROVIDER;
|
||||||
class GRID_BITMAP_TOGGLE_RENDERER;
|
class GRID_BITMAP_TOGGLE_RENDERER;
|
||||||
class WX_COLLAPSIBLE_PANE;
|
class WX_COLLAPSIBLE_PANE;
|
||||||
|
@ -199,6 +200,8 @@ public:
|
||||||
|
|
||||||
wxSize GetBestSize() const;
|
wxSize GetBestSize() const;
|
||||||
|
|
||||||
|
void SaveSettings( PCBNEW_SETTINGS* aCfg );
|
||||||
|
|
||||||
void OnLanguageChanged();
|
void OnLanguageChanged();
|
||||||
|
|
||||||
///< Update the panel contents from the application and board models.
|
///< Update the panel contents from the application and board models.
|
||||||
|
|
Loading…
Reference in New Issue