BOM Generator: redirect BOM buttons to new exporter
Also add legacy generator menu item.
This commit is contained in:
parent
9541e45502
commit
398a336d91
|
@ -1153,6 +1153,12 @@ BOM_FMT_PRESET DIALOG_SYMBOL_FIELDS_TABLE::GetCurrentBomFmtSettings()
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_SYMBOL_FIELDS_TABLE::ShowExportTab()
|
||||
{
|
||||
m_nbPages->SetSelection( 1 );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SYMBOL_FIELDS_TABLE::OnOutputFileBrowseClicked( wxCommandEvent& event )
|
||||
{
|
||||
// Build the absolute path of current output directory to preselect it in the file browser.
|
||||
|
|
|
@ -48,6 +48,8 @@ public:
|
|||
bool TransferDataToWindow() override;
|
||||
bool TransferDataFromWindow() override;
|
||||
|
||||
void ShowExportTab();
|
||||
|
||||
private:
|
||||
void SetupColumnProperties( int aCol );
|
||||
void SetupAllColumnProperties();
|
||||
|
|
|
@ -288,6 +288,7 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
|
|||
toolsMenu->AppendSeparator();
|
||||
toolsMenu->Add( EE_ACTIONS::assignFootprints );
|
||||
toolsMenu->Add( EE_ACTIONS::generateBOM );
|
||||
toolsMenu->Add( EE_ACTIONS::generateBOMLegacy );
|
||||
|
||||
toolsMenu->AppendSeparator();
|
||||
update = toolsMenu->Add( ACTIONS::updateSchematicFromPcb );
|
||||
|
|
|
@ -1047,6 +1047,13 @@ TOOL_ACTION EE_ACTIONS::generateBOM( TOOL_ACTION_ARGS()
|
|||
.Tooltip( _( "Generate a bill of materials for the current schematic" ) )
|
||||
.Icon( BITMAPS::post_bom ) );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::generateBOMLegacy( TOOL_ACTION_ARGS()
|
||||
.Name( "eeschema.EditorControl.generateBOMLegacy" )
|
||||
.Scope( AS_GLOBAL )
|
||||
.MenuText( _( "Generate BOM (Legacy)..." ) )
|
||||
.Tooltip( _( "Generate a bill of materials for the current schematic (Legacy Generator)" ) )
|
||||
);
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::exportSymbolsToLibrary( TOOL_ACTION_ARGS()
|
||||
.Name( "eeschema.EditorControl.exportSymbolsToLibrary" )
|
||||
.Scope( AS_GLOBAL )
|
||||
|
|
|
@ -173,6 +173,7 @@ public:
|
|||
static TOOL_ACTION importFPAssignments;
|
||||
static TOOL_ACTION exportNetlist;
|
||||
static TOOL_ACTION generateBOM;
|
||||
static TOOL_ACTION generateBOMLegacy;
|
||||
static TOOL_ACTION addSymbolToSchematic;
|
||||
static TOOL_ACTION exportSymbolsToLibrary;
|
||||
static TOOL_ACTION exportSymbolsToNewLibrary;
|
||||
|
|
|
@ -2112,6 +2112,14 @@ int SCH_EDITOR_CONTROL::ExportNetlist( const TOOL_EVENT& aEvent )
|
|||
|
||||
|
||||
int SCH_EDITOR_CONTROL::GenerateBOM( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
EditSymbolFields( aEvent );
|
||||
m_frame->GetSymbolFieldsTableDialog()->ShowExportTab();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int SCH_EDITOR_CONTROL::GenerateBOMLegacy( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
InvokeDialogCreateBOM( m_frame );
|
||||
return 0;
|
||||
|
@ -2462,6 +2470,7 @@ void SCH_EDITOR_CONTROL::setTransitions()
|
|||
Go( &SCH_EDITOR_CONTROL::UpdateFromPCB, ACTIONS::updateSchematicFromPcb.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::ExportNetlist, EE_ACTIONS::exportNetlist.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::GenerateBOM, EE_ACTIONS::generateBOM.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::GenerateBOMLegacy, EE_ACTIONS::generateBOMLegacy.MakeEvent() );
|
||||
Go( &SCH_EDITOR_CONTROL::DrawSheetOnClipboard, EE_ACTIONS::drawSheetOnClipboard.MakeEvent() );
|
||||
|
||||
Go( &SCH_EDITOR_CONTROL::ShowSearch, EE_ACTIONS::showSearch.MakeEvent() );
|
||||
|
|
|
@ -121,6 +121,7 @@ public:
|
|||
int ImportFPAssignments( const TOOL_EVENT& aEvent );
|
||||
int ExportNetlist( const TOOL_EVENT& aEvent );
|
||||
int GenerateBOM( const TOOL_EVENT& aEvent );
|
||||
int GenerateBOMLegacy( const TOOL_EVENT& aEvent );
|
||||
int DrawSheetOnClipboard( const TOOL_EVENT& aEvent );
|
||||
|
||||
int ShowSearch( const TOOL_EVENT& aEvent );
|
||||
|
|
Loading…
Reference in New Issue