Store zone display mode in project local settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6886
This commit is contained in:
Jon Evans 2020-12-29 17:19:01 -05:00
parent 487aa37d2e
commit a637f310d0
3 changed files with 4 additions and 6 deletions

View File

@ -154,13 +154,10 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
&m_RatsnestMode, RATSNEST_MODE::ALL, RATSNEST_MODE::ALL,
RATSNEST_MODE::VISIBLE ) );
// TODO: move the rest of PCB_DISPLAY_OPTIONS that are project-specific in here
#if 0
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_OUTLINE,
ZONE_DISPLAY_MODE::SHOW_FILLED ) );
#endif
ZONE_DISPLAY_MODE::SHOW_FILLED, ZONE_DISPLAY_MODE::SHOW_FILLED,
ZONE_DISPLAY_MODE::SHOW_FILLED_OUTLINE ) );
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "project.files",
[&]() -> nlohmann::json

View File

@ -116,7 +116,7 @@ public:
/// The current ratsnest draw mode
RATSNEST_MODE m_RatsnestMode;
/// How zones are drawn (TODO: not yet used)
/// How zones are drawn
ZONE_DISPLAY_MODE m_ZoneDisplayMode;
double m_TrackOpacity; ///< Opacity override for all tracks

View File

@ -131,6 +131,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings()
opts.m_ViaOpacity = localSettings.m_ViaOpacity;
opts.m_PadOpacity = localSettings.m_PadOpacity;
opts.m_ZoneOpacity = localSettings.m_ZoneOpacity;
opts.m_ZoneDisplayMode = localSettings.m_ZoneDisplayMode;
SetDisplayOptions( opts );
wxFileName fn( GetCurrentFileName() );