From 5539a982b5fe4d283c2a014f3a89461190b38273 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 4 Oct 2013 17:23:04 -0500 Subject: [PATCH] CTL_OMIT_PATH patch --- pcbnew/kicad_plugin.cpp | 2 +- pcbnew/kicad_plugin.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 0993d1c16a..56227e7411 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -971,7 +971,7 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const m_out->Print( aNestLevel+1, "(tags %s)\n", m_out->Quotew( aModule->GetKeywords() ).c_str() ); - if( !aModule->GetPath().IsEmpty() ) + if( !( m_ctl & CTL_OMIT_PATH ) && !!aModule->GetPath() ) m_out->Print( aNestLevel+1, "(path %s)\n", m_out->Quotew( aModule->GetPath() ).c_str() ); diff --git a/pcbnew/kicad_plugin.h b/pcbnew/kicad_plugin.h index 4a23ae6306..515e1b1a71 100644 --- a/pcbnew/kicad_plugin.h +++ b/pcbnew/kicad_plugin.h @@ -42,6 +42,7 @@ class PCB_PARSER; #define CTL_OMIT_NETS (1 << 1) #define CTL_OMIT_TSTAMPS (1 << 2) #define CTL_OMIT_INITIAL_COMMENTS (1 << 3) ///< omit MODULE initial comments +#define CTL_OMIT_PATH (1 << 4) // common combinations of the above: @@ -49,7 +50,7 @@ class PCB_PARSER; #define CTL_FOR_CLIPBOARD (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS) /// Format output for a footprint library instead of clipboard or BOARD -#define CTL_FOR_LIBRARY (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS|CTL_OMIT_TSTAMPS) +#define CTL_FOR_LIBRARY (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS|CTL_OMIT_TSTAMPS|CTL_OMIT_PATH) /// The zero arg constructor when PCB_IO is used for PLUGIN::Load() and PLUGIN::Save()ing /// a BOARD file underneath IO_MGR.