Fix bug 910364: When a footprint saved in a .mod file is not on front layer and/or not with orientation 0 degree, the Module editor load it incorrectly.

note:  the Module editor save it with default orientation and layer, but the archive function does not, so some footprints can be not editable.
TODO: modify the Archive Function to use the default layer / orientation.
This commit is contained in:
jean-pierre charras
2012-01-04 20:10:33 +01:00
parent b774d96fb0
commit 5a96588eec
5 changed files with 393 additions and 948 deletions
@@ -326,9 +326,12 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
old_org = aScreen->m_DrawOrg;
oldClipBox = *panel->GetClipBox();
/* Change scale factor, offsets, and clip box to print the whole page. */
panel->SetClipBox( EDA_RECT( wxPoint( 0, 0 ), wxSize( 0x7FFFFF0, 0x7FFFFF0 ) ) );
// Change clip box to print the whole page.
#define MAX_VALUE (INT_MAX/2) // MAX_VALUE is the max we can use in an integer
// and that allows calculations without overflow
panel->SetClipBox( EDA_RECT( wxPoint( 0, 0 ), wxSize( MAX_VALUE, MAX_VALUE ) ) );
// Change scale factor and offset to print the whole page.
bool printReference = parent->GetPrintSheetReference();
if( printReference )