BOM Export: remember filename per project
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17704
This commit is contained in:
parent
d0fe2e06aa
commit
9c058503d9
|
@ -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();
|
||||
|
||||
|
@ -1337,12 +1337,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;
|
||||
|
|
|
@ -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<wxString>( "bom_export_filename",
|
||||
&m_BomExportFileName, "" ) );
|
||||
|
||||
m_params.emplace_back( new PARAM<BOM_PRESET>( "bom_settings",
|
||||
&m_BomSettings, BOM_PRESET::GroupedByValue() ) );
|
||||
m_params.emplace_back( new PARAM_LIST<BOM_PRESET>( "bom_presets",
|
||||
|
|
|
@ -105,6 +105,8 @@ public:
|
|||
|
||||
TEMPLATES m_TemplateFieldNames;
|
||||
|
||||
wxString m_BomExportFileName;
|
||||
|
||||
/// List of stored BOM presets
|
||||
BOM_PRESET m_BomSettings;
|
||||
std::vector<BOM_PRESET> m_BomPresets;
|
||||
|
|
Loading…
Reference in New Issue