Remember width of right AUI panel in PcbNew
This commit is contained in:
parent
92174d414c
commit
54682d39ff
|
@ -267,6 +267,16 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
// The selection filter doesn't need to grow in the vertical direction when docked
|
// The selection filter doesn't need to grow in the vertical direction when docked
|
||||||
m_auimgr.GetPane( "SelectionFilter" ).dock_proportion = 0;
|
m_auimgr.GetPane( "SelectionFilter" ).dock_proportion = 0;
|
||||||
|
|
||||||
|
if( PCBNEW_SETTINGS* settings = dynamic_cast<PCBNEW_SETTINGS*>( config() ) )
|
||||||
|
{
|
||||||
|
if( settings->m_AuiPanels.right_panel_width > 0 )
|
||||||
|
{
|
||||||
|
wxSize size = m_appearancePanel->GetBestSize();
|
||||||
|
size.x = settings->m_AuiPanels.right_panel_width;
|
||||||
|
m_auimgr.GetPane( "LayersManager" ).BestSize( size );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
|
||||||
// hidding it.
|
// hidding it.
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
@ -698,6 +708,7 @@ void PCB_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
cfg->m_PlotLineWidth = Iu2Millimeter( g_DrawDefaultLineThickness );
|
cfg->m_PlotLineWidth = Iu2Millimeter( g_DrawDefaultLineThickness );
|
||||||
cfg->m_AuiPanels.show_microwave_tools = m_show_microwave_tools;
|
cfg->m_AuiPanels.show_microwave_tools = m_show_microwave_tools;
|
||||||
cfg->m_AuiPanels.show_layer_manager = m_show_layer_manager_tools;
|
cfg->m_AuiPanels.show_layer_manager = m_show_layer_manager_tools;
|
||||||
|
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
|
||||||
cfg->m_ShowPageLimits = m_showPageLimits;
|
cfg->m_ShowPageLimits = m_showPageLimits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -805,7 +816,6 @@ void PCB_EDIT_FRAME::ShowChangedLanguage()
|
||||||
// call my base class
|
// call my base class
|
||||||
PCB_BASE_EDIT_FRAME::ShowChangedLanguage();
|
PCB_BASE_EDIT_FRAME::ShowChangedLanguage();
|
||||||
|
|
||||||
// TODO(JE) APPEARANCE
|
|
||||||
wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_appearancePanel );
|
wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_appearancePanel );
|
||||||
pane_info.Caption( _( "Appearance" ) );
|
pane_info.Caption( _( "Appearance" ) );
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
|
@ -85,6 +85,9 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
||||||
m_params.emplace_back( new PARAM<bool>( "aui.show_microwave_tools",
|
m_params.emplace_back( new PARAM<bool>( "aui.show_microwave_tools",
|
||||||
&m_AuiPanels.show_microwave_tools, false ) );
|
&m_AuiPanels.show_microwave_tools, false ) );
|
||||||
|
|
||||||
|
m_params.emplace_back(
|
||||||
|
new PARAM<int>( "aui.right_panel_width", &m_AuiPanels.right_panel_width, -1 ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "footprint_chooser.width",
|
m_params.emplace_back( new PARAM<int>( "footprint_chooser.width",
|
||||||
&m_FootprintChooser.width, -1 ) );
|
&m_FootprintChooser.width, -1 ) );
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ class PCBNEW_SETTINGS : public APP_SETTINGS_BASE
|
||||||
public:
|
public:
|
||||||
struct AUI_PANELS
|
struct AUI_PANELS
|
||||||
{
|
{
|
||||||
|
int right_panel_width;
|
||||||
bool show_microwave_tools;
|
bool show_microwave_tools;
|
||||||
bool show_layer_manager;
|
bool show_layer_manager;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1417,6 +1417,7 @@ void APPEARANCE_CONTROLS::rebuildNets()
|
||||||
|
|
||||||
NETCLASSPTR defaultClass = board->GetDesignSettings().GetNetClasses().GetDefault();
|
NETCLASSPTR defaultClass = board->GetDesignSettings().GetNetClasses().GetDefault();
|
||||||
|
|
||||||
|
m_netclassIdMap[idx] = defaultClass->GetName();
|
||||||
appendNetclass( idx++, defaultClass, true );
|
appendNetclass( idx++, defaultClass, true );
|
||||||
|
|
||||||
for( const wxString& name : names )
|
for( const wxString& name : names )
|
||||||
|
|
Loading…
Reference in New Issue