Commit 26a3029a authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Remove duplicate code to draw and to plot title blocks.

parents c9be8bfd a8a64081
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -62,7 +62,8 @@ const wxString PAGE_INFO::Custom( wxT( "User" ) );
// local readability macro for millimeter wxSize
#define MMsize( x, y )  wxSize( Mm2mils( x ), Mm2mils( y ) )

// All MUST be defined as landscape.  If IsGOST() is true, A4 is dynamically rotated later.
// All MUST be defined as landscape.
// If IsGOST() is true, A4 is dynamically rotated later.
const PAGE_INFO  PAGE_INFO::pageA4(     MMsize( 297,   210 ),   wxT( "A4" ),    wxPAPER_A4 );
const PAGE_INFO  PAGE_INFO::pageA3(     MMsize( 420,   297 ),   wxT( "A3" ),    wxPAPER_A3 );
const PAGE_INFO  PAGE_INFO::pageA2(     MMsize( 594,   420 ),   wxT( "A2" ),    wxPAPER_A2 );
@@ -139,7 +140,7 @@ void PAGE_INFO::setMargins()
        m_left_margin   =
        m_right_margin  =
        m_top_margin    =
        m_bottom_margin = 400;              // Units = mils
        m_bottom_margin = Mm2mils( 10 );
    }
}

+1 −2
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
#include <base_struct.h>
#include <common.h>
#include <plot_common.h>
#include <worksheet.h>
#include <macros.h>
#include <class_base_screen.h>
#include <drawtxt.h>
+49 −800

File changed.

Preview size limit exceeded, changes collapsed.

+5 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include <class_board_item.h>
#elif defined( EESCHEMA )
#include <sch_item_struct.h>
#elif defined( GERBVIEW )
#else
#error "Cannot resolve units formatting due to no definition of EESCHEMA or PCBNEW."
#endif
@@ -325,10 +326,12 @@ bool EDA_TEXT::IsDefaultFormatting() const
           && ( m_MultilineAllowed == false ) );
}


void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControlBits ) const
    throw( IO_ERROR )
{
#ifndef GERBVIEW        // Gerbview does not use EDA_TEXT::Format
                        // and does not define FMT_IU, used here
                        // however this function should exist
    if( !IsDefaultFormatting() )
    {
        aFormatter->Print( aNestLevel+1, "(effects" );
@@ -381,4 +384,5 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl

        aFormatter->Print( 0, ")\n" );
    }
#endif
}
+0 −1
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@
#include <wxstruct.h>
#include <macros.h>
#include <param_config.h>
#include <worksheet.h>
#include <id.h>
#include <build_version.h>
#include <hotkeys_basic.h>
Loading