Remember autotrack width setting
Fixes https://gitlab.com/kicad/code/kicad/issues/6971
This commit is contained in:
parent
0234b7278a
commit
52f822dedb
|
@ -154,6 +154,9 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
|
|||
&m_RatsnestMode, RATSNEST_MODE::ALL, RATSNEST_MODE::ALL,
|
||||
RATSNEST_MODE::VISIBLE ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<bool>( "board.auto_track_width",
|
||||
&m_AutoTrackWidth, true ) );
|
||||
|
||||
m_params.emplace_back( new PARAM_ENUM<ZONE_DISPLAY_MODE>( "board.zone_display_mode",
|
||||
&m_ZoneDisplayMode,
|
||||
ZONE_DISPLAY_MODE::SHOW_FILLED, ZONE_DISPLAY_MODE::SHOW_FILLED,
|
||||
|
|
|
@ -116,6 +116,9 @@ public:
|
|||
/// The current ratsnest draw mode
|
||||
RATSNEST_MODE m_RatsnestMode;
|
||||
|
||||
/// The current setting for whether to automatically adjust track widths to match
|
||||
bool m_AutoTrackWidth;
|
||||
|
||||
/// How zones are drawn
|
||||
ZONE_DISPLAY_MODE m_ZoneDisplayMode;
|
||||
|
||||
|
|
|
@ -134,6 +134,9 @@ bool PCB_EDIT_FRAME::LoadProjectSettings()
|
|||
opts.m_ZoneDisplayMode = localSettings.m_ZoneDisplayMode;
|
||||
SetDisplayOptions( opts );
|
||||
|
||||
BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
|
||||
bds.m_UseConnectedTrackWidth = localSettings.m_AutoTrackWidth;
|
||||
|
||||
wxFileName fn( GetCurrentFileName() );
|
||||
fn.MakeRelativeTo( Prj().GetProjectPath() );
|
||||
LoadWindowState( fn.GetFullPath() );
|
||||
|
@ -181,6 +184,10 @@ void PCB_EDIT_FRAME::SaveProjectSettings()
|
|||
localSettings.m_ZoneOpacity = displayOpts.m_ZoneOpacity;
|
||||
localSettings.m_ZoneDisplayMode = displayOpts.m_ZoneDisplayMode;
|
||||
|
||||
// Save Design settings
|
||||
const BOARD_DESIGN_SETTINGS& bds = GetDesignSettings();
|
||||
localSettings.m_AutoTrackWidth = bds.m_UseConnectedTrackWidth;
|
||||
|
||||
// Save render settings that aren't stored in PCB_DISPLAY_OPTIONS
|
||||
|
||||
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
|
||||
|
|
Loading…
Reference in New Issue