From 51eac3e3e68789ff0d3f842d0c5bd79120f5a1ee Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 5 May 2020 21:43:37 -0400 Subject: [PATCH] Split pcbnew and footprint editor settings getters for clarity --- include/pcb_base_frame.h | 5 ++++- pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp | 4 ++-- pcbnew/dialogs/dialog_copper_zones.cpp | 6 +++--- pcbnew/dialogs/dialog_drc.cpp | 4 ++-- pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp | 4 ++-- pcbnew/dialogs/dialog_export_idf.cpp | 4 ++-- pcbnew/dialogs/dialog_export_step.cpp | 4 ++-- pcbnew/dialogs/dialog_export_svg.cpp | 4 ++-- pcbnew/dialogs/dialog_export_vrml.cpp | 4 ++-- pcbnew/dialogs/dialog_gendrill.cpp | 8 ++++---- pcbnew/dialogs/dialog_keepout_area_properties.cpp | 2 +- pcbnew/dialogs/dialog_netlist.cpp | 4 ++-- pcbnew/dialogs/dialog_non_copper_zones_properties.cpp | 2 +- pcbnew/dialogs/dialog_plot.cpp | 4 ++-- pcbnew/dialogs/dialog_update_pcb.cpp | 4 ++-- pcbnew/exporters/gen_footprints_placefile.cpp | 4 ++-- pcbnew/import_gfx/dialog_import_gfx.cpp | 4 ++-- pcbnew/pcb_base_frame.cpp | 8 +++++++- pcbnew/router/pns_tool_base.cpp | 2 +- 19 files changed, 45 insertions(+), 36 deletions(-) diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index 5465ba9557..17e5c1f90f 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -60,6 +60,7 @@ class ZONE_SETTINGS; class PCB_PLOT_PARAMS; class FP_LIB_TABLE; class PCBNEW_SETTINGS; +class FOOTPRINT_EDITOR_SETTINGS; wxDECLARE_EVENT( BOARD_CHANGED, wxCommandEvent ); @@ -405,7 +406,9 @@ public: void LoadSettings( APP_SETTINGS_BASE* aCfg ) override; void SaveSettings( APP_SETTINGS_BASE* aCfg ) override; - PCBNEW_SETTINGS* GetSettings(); + PCBNEW_SETTINGS* GetPcbNewSettings(); + + FOOTPRINT_EDITOR_SETTINGS* GetFootprintEditorSettings(); void CommonSettingsChanged( bool aEnvVarsChanged ) override; diff --git a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp index 87656b1e44..5a8c86d97c 100644 --- a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp @@ -38,7 +38,7 @@ DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS( PCB_EDIT_FRAME* DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE( aParentFrame ), m_parentFrame( aParentFrame ) { - auto cfg = m_parentFrame->GetSettings(); + auto cfg = m_parentFrame->GetPcbNewSettings(); m_cleanViasOpt->SetValue( cfg->m_Cleanup.cleanup_vias ); m_mergeSegmOpt->SetValue( cfg->m_Cleanup.merge_segments ); @@ -63,7 +63,7 @@ DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS( PCB_EDIT_FRAME* DIALOG_CLEANUP_TRACKS_AND_VIAS::~DIALOG_CLEANUP_TRACKS_AND_VIAS() { - auto cfg = m_parentFrame->GetSettings(); + auto cfg = m_parentFrame->GetPcbNewSettings(); cfg->m_Cleanup.cleanup_vias = m_cleanViasOpt->GetValue(); cfg->m_Cleanup.merge_segments = m_mergeSegmOpt->GetValue(); diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index c505a5af2b..5c66eb88db 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -183,7 +183,7 @@ bool DIALOG_COPPER_ZONE::TransferDataToWindow() m_NetFiltering = false; m_NetSortingByPadCount = true; - auto cfg = m_Parent->GetSettings(); + auto cfg = m_Parent->GetPcbNewSettings(); int opt = cfg->m_Zones.net_sort_mode; m_NetFiltering = opt >= 2; @@ -357,7 +357,7 @@ bool DIALOG_COPPER_ZONE::AcceptOptions( bool aUseExportableSetupOnly ) break; } - auto cfg = m_Parent->GetSettings(); + auto cfg = m_Parent->GetPcbNewSettings(); cfg->m_Zones.hatching_style = static_cast( m_settings.m_Zone_HatchingStyle ); cfg->m_Zones.net_filter = m_DoNotShowNetNameFilter->GetValue().ToStdString(); @@ -468,7 +468,7 @@ void DIALOG_COPPER_ZONE::OnNetSortingOptionSelected( wxCommandEvent& event ) buildAvailableListOfNets(); - auto cfg = m_Parent->GetSettings(); + auto cfg = m_Parent->GetPcbNewSettings(); int configValue = m_NetFiltering ? 2 : 0; diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index a860cf7aa0..48116b58ca 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -91,7 +91,7 @@ DIALOG_DRC::~DIALOG_DRC() { m_brdEditor->FocusOnItem( nullptr ); - PCBNEW_SETTINGS* settings = m_brdEditor->GetSettings(); + PCBNEW_SETTINGS* settings = m_brdEditor->GetPcbNewSettings(); settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue(); settings->m_DrcDialog.test_track_to_zone = m_cbReportAllTrackErrors->GetValue(); settings->m_DrcDialog.test_footprints = m_cbTestFootprints->GetValue(); @@ -143,7 +143,7 @@ void DIALOG_DRC::initValues() displayDRCValues(); - auto cfg = m_brdEditor->GetSettings(); + auto cfg = m_brdEditor->GetPcbNewSettings(); m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones ); m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_track_to_zone ); diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp index 3d0372d73a..e6c3e07dc0 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp @@ -92,7 +92,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aP m_modelsGrid->PushEventHandler( new GRID_TRICKS( m_modelsGrid ) ); // Show/hide text item columns according to the user's preference - m_itemsGrid->ShowHideColumns( m_frame->GetSettings()->m_FootprintTextShownColumns ); + m_itemsGrid->ShowHideColumns( m_frame->GetPcbNewSettings()->m_FootprintTextShownColumns ); // Set up the 3D models grid wxGridCellAttr* attr = new wxGridCellAttr; @@ -159,7 +159,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aP DIALOG_FOOTPRINT_BOARD_EDITOR::~DIALOG_FOOTPRINT_BOARD_EDITOR() { - m_frame->GetSettings()->m_FootprintTextShownColumns = + m_frame->GetPcbNewSettings()->m_FootprintTextShownColumns = m_itemsGrid->GetShownColumns().ToStdString(); // Prevents crash bug in wxGrid's d'tor diff --git a/pcbnew/dialogs/dialog_export_idf.cpp b/pcbnew/dialogs/dialog_export_idf.cpp index 1112a767d0..30fc89dc61 100644 --- a/pcbnew/dialogs/dialog_export_idf.cpp +++ b/pcbnew/dialogs/dialog_export_idf.cpp @@ -50,7 +50,7 @@ public: { SetFocus(); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_idfThouOpt = cfg->m_ExportIdf.units_mils; m_rbUnitSelection->SetSelection( m_idfThouOpt ? 1 : 0 ); @@ -93,7 +93,7 @@ public: { m_idfThouOpt = m_rbUnitSelection->GetSelection() == 1; - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_ExportIdf.units_mils = m_idfThouOpt; cfg->m_ExportIdf.auto_adjust = m_AutoAdjust; diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp index f4035c0e42..65995e271b 100644 --- a/pcbnew/dialogs/dialog_export_step.cpp +++ b/pcbnew/dialogs/dialog_export_step.cpp @@ -100,7 +100,7 @@ public: { GetOriginOption(); // Update m_STEP_org_opt member. - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_ExportStep.origin_mode = static_cast( m_STEP_org_opt ); cfg->m_ExportStep.origin_units = m_STEP_OrgUnitChoice->GetSelection(); @@ -143,7 +143,7 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString& SetFocus(); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_STEP_org_opt = static_cast( cfg->m_ExportStep.origin_mode ); diff --git a/pcbnew/dialogs/dialog_export_svg.cpp b/pcbnew/dialogs/dialog_export_svg.cpp index 288939acb4..8721d8df9a 100644 --- a/pcbnew/dialogs/dialog_export_svg.cpp +++ b/pcbnew/dialogs/dialog_export_svg.cpp @@ -108,7 +108,7 @@ DIALOG_EXPORT_SVG::~DIALOG_EXPORT_SVG() m_outputDirectory = m_outputDirectoryName->GetValue(); m_outputDirectory.Replace( wxT( "\\" ), wxT( "/" ) ); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_ExportSvg.black_and_white = m_printBW; cfg->m_ExportSvg.mirror = m_printMirror; @@ -132,7 +132,7 @@ DIALOG_EXPORT_SVG::~DIALOG_EXPORT_SVG() void DIALOG_EXPORT_SVG::initDialog() { - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_printBW = cfg->m_ExportSvg.black_and_white; m_printMirror = cfg->m_ExportSvg.mirror; diff --git a/pcbnew/dialogs/dialog_export_vrml.cpp b/pcbnew/dialogs/dialog_export_vrml.cpp index 2d1ff32020..d3b9147d75 100644 --- a/pcbnew/dialogs/dialog_export_vrml.cpp +++ b/pcbnew/dialogs/dialog_export_vrml.cpp @@ -61,7 +61,7 @@ public: { m_filePicker->SetFocus(); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_unitsOpt = cfg->m_ExportVrml.units; m_copy3DFilesOpt = cfg->m_ExportVrml.copy_3d_models; @@ -96,7 +96,7 @@ public: m_unitsOpt = GetUnits(); m_copy3DFilesOpt = GetCopyFilesOption(); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_ExportVrml.units = m_unitsOpt; cfg->m_ExportVrml.copy_3d_models = m_copy3DFilesOpt; diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index 3346f39aea..bedba02770 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -100,7 +100,7 @@ DIALOG_GENDRILL::~DIALOG_GENDRILL() void DIALOG_GENDRILL::initDialog() { - auto cfg = m_pcbEditFrame->GetSettings(); + auto cfg = m_pcbEditFrame->GetPcbNewSettings(); m_Merge_PTH_NPTH = cfg->m_GenDrill.merge_pth_npth; m_MinimalHeader = cfg->m_GenDrill.minimal_header; @@ -236,7 +236,7 @@ void DIALOG_GENDRILL::UpdateConfig() { UpdateDrillParams(); - auto cfg = m_pcbEditFrame->GetSettings(); + auto cfg = m_pcbEditFrame->GetPcbNewSettings(); cfg->m_GenDrill.merge_pth_npth = m_Merge_PTH_NPTH; cfg->m_GenDrill.minimal_header = m_MinimalHeader; @@ -257,13 +257,13 @@ void DIALOG_GENDRILL::OnSelDrillUnitsSelected( wxCommandEvent& event ) void DIALOG_GENDRILL::OnGenMapFile( wxCommandEvent& event ) { - GenDrillAndMapFiles( false, true); + GenDrillAndMapFiles( false, true ); } void DIALOG_GENDRILL::OnGenDrillFile( wxCommandEvent& event ) { - GenDrillAndMapFiles(true, false); + GenDrillAndMapFiles( true, false ); } diff --git a/pcbnew/dialogs/dialog_keepout_area_properties.cpp b/pcbnew/dialogs/dialog_keepout_area_properties.cpp index cde2a55eca..1e039480a2 100644 --- a/pcbnew/dialogs/dialog_keepout_area_properties.cpp +++ b/pcbnew/dialogs/dialog_keepout_area_properties.cpp @@ -175,7 +175,7 @@ bool DIALOG_KEEPOUT_AREA_PROPERTIES::TransferDataFromWindow() break; } - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_Zones.hatching_style = static_cast( m_zonesettings.m_Zone_HatchingStyle ); m_zonesettings.m_Zone_45_Only = m_cbConstrainCtrl->GetValue(); diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index a5950959fa..14651efc47 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -71,7 +71,7 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxString& aNetlistFullF m_NetlistFilenameCtrl->SetValue( m_netlistPath ); m_browseButton->SetBitmap( KiBitmap( folder_xpm ) ); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_cbUpdateFootprints->SetValue( cfg->m_NetlistDialog.update_footprints ); m_cbDeleteShortingTracks->SetValue( cfg->m_NetlistDialog.delete_shorting_tracks ); @@ -103,7 +103,7 @@ DIALOG_NETLIST::~DIALOG_NETLIST() m_warnForNoNetPads = m_cbWarnNoNetPad->GetValue(); m_matchByUUID = m_matchByTimestamp->GetSelection() == 0; - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_NetlistDialog.report_filter = m_MessageWindow->GetVisibleSeverities(); cfg->m_NetlistDialog.update_footprints = m_cbUpdateFootprints->GetValue(); diff --git a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp index dfa3fa9f4f..3023910f4c 100644 --- a/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp +++ b/pcbnew/dialogs/dialog_non_copper_zones_properties.cpp @@ -260,7 +260,7 @@ bool DIALOG_NON_COPPER_ZONES_EDITOR::TransferDataFromWindow() m_settings.m_HatchFillTypeSmoothingLevel = m_spinCtrlSmoothLevel->GetValue(); m_settings.m_HatchFillTypeSmoothingValue = m_spinCtrlSmoothValue->GetValue(); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_Zones.hatching_style = static_cast( m_settings.m_Zone_HatchingStyle ); m_settings.m_Zone_45_Only = m_ConstrainOpt->GetValue(); diff --git a/pcbnew/dialogs/dialog_plot.cpp b/pcbnew/dialogs/dialog_plot.cpp index 8088259d57..9077f62f5d 100644 --- a/pcbnew/dialogs/dialog_plot.cpp +++ b/pcbnew/dialogs/dialog_plot.cpp @@ -74,7 +74,7 @@ void DIALOG_PLOT::init_Dialog() BOARD* board = m_parent->GetBoard(); wxFileName fileName; - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_XScaleAdjust = cfg->m_Plot.fine_scale_x; m_YScaleAdjust = cfg->m_Plot.fine_scale_y; @@ -657,7 +657,7 @@ void DIALOG_PLOT::applyPlotSettings() reporter.Report( msg, RPT_SEVERITY_INFO ); } - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_Plot.fine_scale_x = m_XScaleAdjust; cfg->m_Plot.fine_scale_y = m_YScaleAdjust; diff --git a/pcbnew/dialogs/dialog_update_pcb.cpp b/pcbnew/dialogs/dialog_update_pcb.cpp index ce2751e2c1..60e3e03d9b 100644 --- a/pcbnew/dialogs/dialog_update_pcb.cpp +++ b/pcbnew/dialogs/dialog_update_pcb.cpp @@ -50,7 +50,7 @@ DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST* aNetlist m_netlist( aNetlist ), m_initialized( false ) { - auto cfg = m_frame->GetSettings(); + auto cfg = m_frame->GetPcbNewSettings(); m_cbRelinkFootprints->SetValue( cfg->m_NetlistDialog.associate_by_ref_sch ); m_cbUpdateFootprints->SetValue( cfg->m_NetlistDialog.update_footprints ); @@ -85,7 +85,7 @@ DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB() { m_warnForNoNetPads = m_cbWarnNoNetPad->GetValue(); - auto cfg = m_frame->GetSettings(); + auto cfg = m_frame->GetPcbNewSettings(); cfg->m_NetlistDialog.associate_by_ref_sch = m_cbRelinkFootprints->GetValue(); cfg->m_NetlistDialog.update_footprints = m_cbUpdateFootprints->GetValue(); diff --git a/pcbnew/exporters/gen_footprints_placefile.cpp b/pcbnew/exporters/gen_footprints_placefile.cpp index 6e5fc7c901..e889073538 100644 --- a/pcbnew/exporters/gen_footprints_placefile.cpp +++ b/pcbnew/exporters/gen_footprints_placefile.cpp @@ -146,7 +146,7 @@ void DIALOG_GEN_FOOTPRINT_POSITION::initDialog() { m_browseButton->SetBitmap( KiBitmap( folder_xpm ) ); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_units = static_cast( cfg->m_PlaceFile.units ); m_fileOpt = cfg->m_PlaceFile.file_options; @@ -204,7 +204,7 @@ void DIALOG_GEN_FOOTPRINT_POSITION::OnGenerate( wxCommandEvent& event ) m_fileFormat = m_rbFormat->GetSelection(); m_includeBoardEdge = m_cbIncludeBoardEdge->GetValue(); - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_PlaceFile.units = static_cast( m_units ); cfg->m_PlaceFile.file_options = m_fileOpt; diff --git a/pcbnew/import_gfx/dialog_import_gfx.cpp b/pcbnew/import_gfx/dialog_import_gfx.cpp index 9ecee68c0c..09219b70c4 100644 --- a/pcbnew/import_gfx/dialog_import_gfx.cpp +++ b/pcbnew/import_gfx/dialog_import_gfx.cpp @@ -75,7 +75,7 @@ DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX( PCB_BASE_FRAME* aParent, bool aImportAsFoo m_lineWidth = 0.2; // always in mm m_lineWidthUnits = 0; - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); m_layer = cfg->m_ImportGraphics.layer; m_placementInteractive = cfg->m_ImportGraphics.interactive_placement; @@ -120,7 +120,7 @@ DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX( PCB_BASE_FRAME* aParent, bool aImportAsFoo DIALOG_IMPORT_GFX::~DIALOG_IMPORT_GFX() { - auto cfg = m_parent->GetSettings(); + auto cfg = m_parent->GetPcbNewSettings(); cfg->m_ImportGraphics.layer = m_layer; cfg->m_ImportGraphics.interactive_placement = m_placementInteractive; diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index f94df80014..4bf3fb34bc 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -769,12 +769,18 @@ void PCB_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) } -PCBNEW_SETTINGS* PCB_BASE_FRAME::GetSettings() +PCBNEW_SETTINGS* PCB_BASE_FRAME::GetPcbNewSettings() { return Pgm().GetSettingsManager().GetAppSettings(); } +FOOTPRINT_EDITOR_SETTINGS* PCB_BASE_FRAME::GetFootprintEditorSettings() +{ + return Pgm().GetSettingsManager().GetAppSettings(); +} + + void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged ) { EDA_DRAW_FRAME::CommonSettingsChanged( aEnvVarsChanged ); diff --git a/pcbnew/router/pns_tool_base.cpp b/pcbnew/router/pns_tool_base.cpp index e1846a1a26..017c55182d 100644 --- a/pcbnew/router/pns_tool_base.cpp +++ b/pcbnew/router/pns_tool_base.cpp @@ -108,7 +108,7 @@ void TOOL_BASE::Reset( RESET_REASON aReason ) m_router->UpdateSizes( m_savedSizes ); - PCBNEW_SETTINGS* settings = frame()->GetSettings(); + PCBNEW_SETTINGS* settings = frame()->GetPcbNewSettings(); if( !settings->m_PnsSettings ) settings->m_PnsSettings = std::make_unique( settings, "tools.pns" );