diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 56dc113883..049aa7b686 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -1230,14 +1230,15 @@ double D_PAD::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const } // Other layers are shown without any conditions - return 0; + return 0.0; } const BOX2I D_PAD::ViewBBox() const { - // Bounding box includes soldermask too - int solderMaskMargin = GetSolderMaskMargin(); + // Bounding box includes soldermask too. Remember mask and/or paste + // margins can be < 0 + int solderMaskMargin = std::max( GetSolderMaskMargin(), 0 ); VECTOR2I solderPasteMargin = VECTOR2D( GetSolderPasteMargin() ); EDA_RECT bbox = GetBoundingBox(); diff --git a/pcbnew/kicad_clipboard.cpp b/pcbnew/kicad_clipboard.cpp index 13113a1a91..5b4f380849 100644 --- a/pcbnew/kicad_clipboard.cpp +++ b/pcbnew/kicad_clipboard.cpp @@ -38,7 +38,7 @@ #include CLIPBOARD_IO::CLIPBOARD_IO(): - PCB_IO( CTL_STD_LAYER_NAMES ), + PCB_IO( CTL_FOR_CLIPBOARD ), m_formatter(), m_parser( new CLIPBOARD_PARSER() ) { diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 10af8b74c0..4687390183 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -453,10 +453,7 @@ void PCB_IO::formatLayer( const BOARD_ITEM* aItem ) const { PCB_LAYER_ID layer = aItem->GetLayer(); - if( m_ctl & CTL_STD_LAYER_NAMES ) // English layer names should never need quoting. - m_out->Print( 0, " (layer %s)", TO_UTF8( BOARD::GetStandardLayerName( layer ) ) ); - else - m_out->Print( 0, " (layer %s)", m_out->Quotew( LSET::Name( layer ) ).c_str() ); + m_out->Print( 0, " (layer %s)", m_out->Quotew( LSET::Name( layer ) ).c_str() ); } diff --git a/pcbnew/kicad_plugin.h b/pcbnew/kicad_plugin.h index 909f6036f6..bfa453f8e7 100644 --- a/pcbnew/kicad_plugin.h +++ b/pcbnew/kicad_plugin.h @@ -92,7 +92,6 @@ class TEXTE_PCB; #define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag -#define CTL_STD_LAYER_NAMES (1 << 0) ///< Use English Standard layer names #define CTL_OMIT_NETS (1 << 1) ///< Omit pads net names (useless in library) #define CTL_OMIT_TSTAMPS (1 << 2) ///< Omit component time stamp (useless in library) #define CTL_OMIT_INITIAL_COMMENTS (1 << 3) ///< omit MODULE initial comments @@ -106,10 +105,10 @@ class TEXTE_PCB; // common combinations of the above: /// Format output for the clipboard instead of footprint library or BOARD -#define CTL_FOR_CLIPBOARD (CTL_STD_LAYER_NAMES|CTL_OMIT_NETS) +#define CTL_FOR_CLIPBOARD // (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|CTL_OMIT_PATH|CTL_OMIT_AT|CTL_OMIT_LIBNAME) +#define CTL_FOR_LIBRARY (CTL_OMIT_NETS|CTL_OMIT_TSTAMPS|CTL_OMIT_PATH|CTL_OMIT_AT|CTL_OMIT_LIBNAME) /// The zero arg constructor when PCB_IO is used for PLUGIN::Load() and PLUGIN::Save()ing /// a BOARD file underneath IO_MGR.