Disambiguate backannotation (Update Schematic from PCB) from Cvpcb.
This commit is contained in:
parent
ae8239a4f2
commit
90da5fccbd
|
@ -284,10 +284,10 @@ bool CVPCB_MAINFRAME::SaveFootprintAssociation( bool doSaveSchematic )
|
||||||
std::string payload;
|
std::string payload;
|
||||||
STRING_FORMATTER sf;
|
STRING_FORMATTER sf;
|
||||||
|
|
||||||
m_netlist.FormatBackAnnotation( &sf );
|
m_netlist.FormatCvpcbNetlist( &sf );
|
||||||
|
|
||||||
payload = sf.GetString();
|
payload = sf.GetString();
|
||||||
Kiway().ExpressMail( FRAME_SCH, MAIL_BACKANNOTATE_FOOTPRINTS, payload );
|
Kiway().ExpressMail( FRAME_SCH, MAIL_ASSIGN_FOOTPRINTS, payload );
|
||||||
|
|
||||||
if( doSaveSchematic )
|
if( doSaveSchematic )
|
||||||
{
|
{
|
||||||
|
|
|
@ -248,7 +248,7 @@ set( EESCHEMA_SRCS
|
||||||
netlist_exporters/netlist_exporter_pspice.cpp
|
netlist_exporters/netlist_exporter_pspice.cpp
|
||||||
|
|
||||||
tools/backannotate.cpp
|
tools/backannotate.cpp
|
||||||
tools/backanno.cpp
|
tools/assign_footprints.cpp
|
||||||
tools/ee_actions.cpp
|
tools/ee_actions.cpp
|
||||||
tools/ee_grid_helper.cpp
|
tools/ee_grid_helper.cpp
|
||||||
tools/ee_inspection_tool.cpp
|
tools/ee_inspection_tool.cpp
|
||||||
|
|
|
@ -583,11 +583,11 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MAIL_BACKANNOTATE_FOOTPRINTS:
|
case MAIL_ASSIGN_FOOTPRINTS:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SCH_EDITOR_CONTROL* controlTool = m_toolManager->GetTool<SCH_EDITOR_CONTROL>();
|
SCH_EDITOR_CONTROL* controlTool = m_toolManager->GetTool<SCH_EDITOR_CONTROL>();
|
||||||
controlTool->BackAnnotateFootprints( payload );
|
controlTool->AssignFootprints( payload );
|
||||||
}
|
}
|
||||||
catch( const IO_ERROR& )
|
catch( const IO_ERROR& )
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include <kicad_string.h>
|
#include <kicad_string.h>
|
||||||
#include <kiface_i.h>
|
#include <kiface_i.h>
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
#include <build_version.h>
|
|
||||||
#include <wildcards_and_files_ext.h>
|
#include <wildcards_and_files_ext.h>
|
||||||
#include <sch_sheet_path.h>
|
#include <sch_sheet_path.h>
|
||||||
#include <sch_component.h>
|
#include <sch_component.h>
|
||||||
|
@ -40,7 +39,7 @@
|
||||||
#include <tools/sch_editor_control.h>
|
#include <tools/sch_editor_control.h>
|
||||||
|
|
||||||
|
|
||||||
void SCH_EDITOR_CONTROL::BackAnnotateFootprints( const std::string& aChangedSetOfReferences )
|
void SCH_EDITOR_CONTROL::AssignFootprints( const std::string& aChangedSetOfReferences )
|
||||||
{
|
{
|
||||||
// Build a flat list of components in schematic:
|
// Build a flat list of components in schematic:
|
||||||
SCH_REFERENCE_LIST refs;
|
SCH_REFERENCE_LIST refs;
|
||||||
|
@ -56,7 +55,7 @@ void SCH_EDITOR_CONTROL::BackAnnotateFootprints( const std::string& aChangedSetO
|
||||||
{
|
{
|
||||||
Scan( &doc, &lexer );
|
Scan( &doc, &lexer );
|
||||||
|
|
||||||
CPTREE& back_anno = doc.get_child( "back_annotation" );
|
CPTREE& back_anno = doc.get_child( "cvpcb_netlist" );
|
||||||
wxString footprint;
|
wxString footprint;
|
||||||
|
|
||||||
for( PTREE::const_iterator ref = back_anno.begin(); ref != back_anno.end(); ++ref )
|
for( PTREE::const_iterator ref = back_anno.begin(); ref != back_anno.end(); ++ref )
|
|
@ -137,7 +137,7 @@ public:
|
||||||
int ToggleHiddenFields( const TOOL_EVENT& aEvent );
|
int ToggleHiddenFields( const TOOL_EVENT& aEvent );
|
||||||
int ToggleForceHV( const TOOL_EVENT& aEvent );
|
int ToggleForceHV( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
void BackAnnotateFootprints( const std::string& aChangedSetOfReferences );
|
void AssignFootprints( const std::string& aChangedSetOfReferences );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds a component in the schematic and an item in this component.
|
* Finds a component in the schematic and an item in this component.
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
enum MAIL_T
|
enum MAIL_T
|
||||||
{
|
{
|
||||||
MAIL_CROSS_PROBE, // PCB<->SCH, CVPCB->SCH cross-probing.
|
MAIL_CROSS_PROBE, // PCB<->SCH, CVPCB->SCH cross-probing.
|
||||||
MAIL_BACKANNOTATE_FOOTPRINTS, // CVPCB->SCH footprint stuffing
|
MAIL_ASSIGN_FOOTPRINTS, // CVPCB->SCH footprint stuffing
|
||||||
MAIL_SCH_SAVE, // CVPCB->SCH save the schematic
|
MAIL_SCH_SAVE, // CVPCB->SCH save the schematic
|
||||||
MAIL_EESCHEMA_NETLIST, // SCH->CVPCB netlist immediately after launching CVPCB
|
MAIL_EESCHEMA_NETLIST, // SCH->CVPCB netlist immediately after launching CVPCB
|
||||||
MAIL_PCB_UPDATE, // SCH->PCB forward update
|
MAIL_PCB_UPDATE, // SCH->PCB forward update
|
||||||
|
|
|
@ -282,11 +282,11 @@ public:
|
||||||
#define CTL_OMIT_NETS (1<<1)
|
#define CTL_OMIT_NETS (1<<1)
|
||||||
#define CTL_OMIT_FILTERS (1<<2)
|
#define CTL_OMIT_FILTERS (1<<2)
|
||||||
|
|
||||||
#define CTL_FOR_BACKANNO (CTL_OMIT_NETS | CTL_OMIT_FILTERS | CTL_OMIT_EXTRA)
|
#define CTL_FOR_CVPCB (CTL_OMIT_NETS | CTL_OMIT_FILTERS | CTL_OMIT_EXTRA)
|
||||||
|
|
||||||
void FormatBackAnnotation( OUTPUTFORMATTER* aOut )
|
void FormatCbpcbNetlist( OUTPUTFORMATTER* aOut )
|
||||||
{
|
{
|
||||||
Format( "back_annotation", aOut, 0, CTL_FOR_BACKANNO );
|
Format( "cvpcb_netlist", aOut, 0, CTL_FOR_CVPCB );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue