diff --git a/common/class_page_info.cpp b/common/class_page_info.cpp index a4856b1581..cc3df246ca 100644 --- a/common/class_page_info.cpp +++ b/common/class_page_info.cpp @@ -328,8 +328,8 @@ void PAGE_INFO::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aContro // Internally, the page size is in mils if( GetType() == PAGE_INFO::Custom ) aFormatter->Print( 0, " %g %g", - GetCustomWidthMils() * 25.4 / 1000.0, - GetCustomHeightMils() * 25.4 / 1000.0 ); + GetWidthMils() * 25.4 / 1000.0, + GetHeightMils() * 25.4 / 1000.0 ); if( !IsCustom() && IsPortrait() ) aFormatter->Print( 0, " portrait" ); diff --git a/common/common_plot_functions.cpp b/common/common_plot_functions.cpp index 543a05d059..f67f781fb2 100644 --- a/common/common_plot_functions.cpp +++ b/common/common_plot_functions.cpp @@ -98,8 +98,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock, drawList.SetSheetNumber( aSheetNumber ); drawList.SetSheetCount( aNumberOfSheets ); - drawList.BuildWorkSheetGraphicList( aPageInfo.GetType(), aFilename, - aSheetDesc, aTitleBlock, plotColor, plotColor ); + drawList.BuildWorkSheetGraphicList( aPageInfo.GetType(), aSheetDesc, + aFilename, aTitleBlock, plotColor, plotColor ); // Draw item list for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; diff --git a/common/worksheet.cpp b/common/worksheet.cpp index 7d639f479c..2044966f66 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -198,11 +198,9 @@ const wxString EDA_DRAW_FRAME::GetXYSheetReferences( const wxPoint& aPosition ) wxString EDA_DRAW_FRAME::GetScreenDesc() { - wxString msg; - - msg << GetScreen()->m_ScreenNumber << wxT( "/" ) - << GetScreen()->m_NumberOfScreens; - return msg; + // Virtual function, in basic function, returns + // an empty string. + return wxEmptyString; } // returns the full text corresponding to the aTextbase, diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index de0c635218..18ebe89f73 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -403,7 +403,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen ) if( printReference ) parent->DrawWorkSheet( dc, aScreen, GetDefaultLineThickness(), - IU_PER_MILS, parent->GetScreenDesc() ); + IU_PER_MILS, aScreen->GetFileName() ); g_DrawBgColor = bg_color; aScreen->m_IsPrinting = false; diff --git a/pcbnew/printout_controler.cpp b/pcbnew/printout_controler.cpp index 2a3d4d6f5d..1361e6785d 100644 --- a/pcbnew/printout_controler.cpp +++ b/pcbnew/printout_controler.cpp @@ -163,10 +163,15 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() wxBusyCursor dummy; -#ifdef PCBNEW - boardBoundingBox =((PCB_BASE_FRAME*) m_Parent)->GetBoard()->ComputeBoundingBox(); -#else +#if defined (PCBNEW) + BOARD * brd = ((PCB_BASE_FRAME*) m_Parent)->GetBoard(); + boardBoundingBox = brd->ComputeBoundingBox(); + wxString titleblockFilename = brd->GetFileName(); +#elif defined (GERBVIEW) boardBoundingBox = ((GERBVIEW_FRAME*) m_Parent)->GetLayoutBoundingBox(); + wxString titleblockFilename; // TODO see if we uses the gerber file name +#else + #error BOARD_PRINTOUT_CONTROLLER::DrawPage() works only for PCBNEW or GERBVIEW #endif // Use the page size as the drawing area when the board is shown or the user scale @@ -359,7 +364,7 @@ void BOARD_PRINTOUT_CONTROLLER::DrawPage() if( m_PrintParams.PrintBorderAndTitleBlock() ) m_Parent->DrawWorkSheet( dc, screen, m_PrintParams.m_PenDefaultSize, - IU_PER_MILS, m_Parent->GetScreenDesc() ); + IU_PER_MILS, titleblockFilename ); m_Parent->PrintPage( dc, m_PrintParams.m_PrintMaskLayer, printMirror, &m_PrintParams );