From 90da5fccbd097ad700a34d14bdec96bfcf20f9c9 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 14 Oct 2020 20:20:54 +0100 Subject: [PATCH] Disambiguate backannotation (Update Schematic from PCB) from Cvpcb. --- cvpcb/readwrite_dlgs.cpp | 4 ++-- eeschema/CMakeLists.txt | 2 +- eeschema/cross-probing.cpp | 4 ++-- eeschema/tools/{backanno.cpp => assign_footprints.cpp} | 5 ++--- eeschema/tools/sch_editor_control.h | 2 +- include/mail_type.h | 2 +- pcbnew/netlist_reader/pcb_netlist.h | 6 +++--- 7 files changed, 12 insertions(+), 13 deletions(-) rename eeschema/tools/{backanno.cpp => assign_footprints.cpp} (97%) diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 2e3d35188a..2a61431a4c 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -284,10 +284,10 @@ bool CVPCB_MAINFRAME::SaveFootprintAssociation( bool doSaveSchematic ) std::string payload; STRING_FORMATTER sf; - m_netlist.FormatBackAnnotation( &sf ); + m_netlist.FormatCvpcbNetlist( &sf ); payload = sf.GetString(); - Kiway().ExpressMail( FRAME_SCH, MAIL_BACKANNOTATE_FOOTPRINTS, payload ); + Kiway().ExpressMail( FRAME_SCH, MAIL_ASSIGN_FOOTPRINTS, payload ); if( doSaveSchematic ) { diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 329d4ca37a..02bbf285b6 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -248,7 +248,7 @@ set( EESCHEMA_SRCS netlist_exporters/netlist_exporter_pspice.cpp tools/backannotate.cpp - tools/backanno.cpp + tools/assign_footprints.cpp tools/ee_actions.cpp tools/ee_grid_helper.cpp tools/ee_inspection_tool.cpp diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 7dcae8dff6..cc1c728528 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -583,11 +583,11 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) } break; - case MAIL_BACKANNOTATE_FOOTPRINTS: + case MAIL_ASSIGN_FOOTPRINTS: try { SCH_EDITOR_CONTROL* controlTool = m_toolManager->GetTool(); - controlTool->BackAnnotateFootprints( payload ); + controlTool->AssignFootprints( payload ); } catch( const IO_ERROR& ) { diff --git a/eeschema/tools/backanno.cpp b/eeschema/tools/assign_footprints.cpp similarity index 97% rename from eeschema/tools/backanno.cpp rename to eeschema/tools/assign_footprints.cpp index 3bceef60d5..13ecbe8d39 100644 --- a/eeschema/tools/backanno.cpp +++ b/eeschema/tools/assign_footprints.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -40,7 +39,7 @@ #include -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: SCH_REFERENCE_LIST refs; @@ -56,7 +55,7 @@ void SCH_EDITOR_CONTROL::BackAnnotateFootprints( const std::string& aChangedSetO { Scan( &doc, &lexer ); - CPTREE& back_anno = doc.get_child( "back_annotation" ); + CPTREE& back_anno = doc.get_child( "cvpcb_netlist" ); wxString footprint; for( PTREE::const_iterator ref = back_anno.begin(); ref != back_anno.end(); ++ref ) diff --git a/eeschema/tools/sch_editor_control.h b/eeschema/tools/sch_editor_control.h index d4db9a2668..e58b5baf04 100644 --- a/eeschema/tools/sch_editor_control.h +++ b/eeschema/tools/sch_editor_control.h @@ -137,7 +137,7 @@ public: int ToggleHiddenFields( 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. diff --git a/include/mail_type.h b/include/mail_type.h index 60dda1bdc4..6ce0f6093b 100644 --- a/include/mail_type.h +++ b/include/mail_type.h @@ -37,7 +37,7 @@ enum MAIL_T { 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_EESCHEMA_NETLIST, // SCH->CVPCB netlist immediately after launching CVPCB MAIL_PCB_UPDATE, // SCH->PCB forward update diff --git a/pcbnew/netlist_reader/pcb_netlist.h b/pcbnew/netlist_reader/pcb_netlist.h index afbae534a5..c70e2f4980 100644 --- a/pcbnew/netlist_reader/pcb_netlist.h +++ b/pcbnew/netlist_reader/pcb_netlist.h @@ -282,11 +282,11 @@ public: #define CTL_OMIT_NETS (1<<1) #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 ); } };