EEschema, net navigator: save settings when closing Eeschema.

Fixes #16845
https://gitlab.com/kicad/code/kicad/-/issues/16845
This commit is contained in:
jean-pierre charras 2024-02-01 12:53:33 +01:00
parent 285067dad1
commit e8f51b61a6
3 changed files with 13 additions and 3 deletions

View File

@ -257,6 +257,18 @@ void SCH_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
cfg->m_AuiPanels.show_properties = propertiesPane.IsShown();
cfg->m_AuiPanels.properties_splitter = m_propertiesPanel->SplitterProportion();
cfg->m_AuiPanels.properties_panel_width = m_propertiesPanel->GetSize().x;
wxAuiPaneInfo& netNavigatorPane = m_auimgr.GetPane( NetNavigatorPaneName() );
cfg->m_AuiPanels.show_net_nav_panel = netNavigatorPane.IsShown();
cfg->m_AuiPanels.float_net_nav_panel = netNavigatorPane.IsFloating();
if( netNavigatorPane.IsDocked() )
cfg->m_AuiPanels.net_nav_panel_docked_size = m_netNavigator->GetSize();
else
{
cfg->m_AuiPanels.net_nav_panel_float_pos = netNavigatorPane.floating_pos;
cfg->m_AuiPanels.net_nav_panel_float_size = netNavigatorPane.floating_size;
}
}
}

View File

@ -241,9 +241,6 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
m_params.emplace_back( new PARAM<wxSize>( "aui.net_nav_panel_docked_size",
&m_AuiPanels.net_nav_panel_docked_size, wxSize( 120, -1 ) ) );
m_params.emplace_back( new PARAM<bool>( "aui.float_net_nav_panel",
&m_AuiPanels.float_net_nav_panel, false ) );
m_params.emplace_back( new PARAM<wxPoint>( "aui.net_nav_panel_float_pos",
&m_AuiPanels.net_nav_panel_float_pos, wxPoint( 50, 200 ), false ) );

View File

@ -269,6 +269,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
&& cfg->m_AuiPanels.net_nav_panel_float_size.GetHeight() > 0 )
{
netNavigatorPane.FloatingSize( cfg->m_AuiPanels.net_nav_panel_float_size );
netNavigatorPane.FloatingPosition( cfg->m_AuiPanels.net_nav_panel_float_pos );
}
if( cfg->m_AuiPanels.properties_panel_width > 0 )