diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index 5222597fca..bc02062963 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -305,7 +305,7 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent ) case SCOPE::SCOPE_SHEET_RECURSIVE: m_radioRecursive->SetValue( true ); break; } - m_outputFileName->SetValue( cfg->m_FieldEditorPanel.export_filename ); + m_outputFileName->SetValue( m_schSettings.m_BomExportFileName ); Center(); @@ -1338,12 +1338,13 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnClose( wxCloseEvent& aEvent ) // Save all our settings since we're really closing savePresetsToSchematic(); + m_schSettings.m_BomExportFileName = m_outputFileName->GetValue(); + EESCHEMA_SETTINGS* cfg = m_parent->eeconfig(); cfg->m_FieldEditorPanel.width = GetSize().x; cfg->m_FieldEditorPanel.height = GetSize().y; cfg->m_FieldEditorPanel.page = m_nbPages->GetSelection(); - cfg->m_FieldEditorPanel.export_filename = m_outputFileName->GetValue(); if( m_radioHighlight->GetValue() ) cfg->m_FieldEditorPanel.selection_mode = 0; diff --git a/eeschema/schematic_settings.cpp b/eeschema/schematic_settings.cpp index 4ee4bb1308..b6fcce9461 100644 --- a/eeschema/schematic_settings.cpp +++ b/eeschema/schematic_settings.cpp @@ -196,6 +196,9 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin m_TemplateFieldNames.AddTemplateFieldNames( cfg->m_Drawing.field_names ); }, {} ) ); + m_params.emplace_back( new PARAM( "bom_export_filename", + &m_BomExportFileName, "" ) ); + m_params.emplace_back( new PARAM( "bom_settings", &m_BomSettings, BOM_PRESET::GroupedByValue() ) ); m_params.emplace_back( new PARAM_LIST( "bom_presets", diff --git a/eeschema/schematic_settings.h b/eeschema/schematic_settings.h index 7c9ba78235..681a1fd8a4 100644 --- a/eeschema/schematic_settings.h +++ b/eeschema/schematic_settings.h @@ -105,6 +105,8 @@ public: TEMPLATES m_TemplateFieldNames; + wxString m_BomExportFileName; + /// List of stored BOM presets BOM_PRESET m_BomSettings; std::vector m_BomPresets;