diff --git a/common/worksheet.cpp b/common/worksheet.cpp index d12455316d..a992fc1afe 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -1032,7 +1032,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_wid Color = RED; // if not printing, draw the page limits: - if( !screen->m_IsPrinting & g_ShowPageLimits ) + if( !screen->m_IsPrinting && g_ShowPageLimits ) { GRSetDrawMode( DC, GR_COPY ); GRRect( m_canvas->GetClipBox(), DC, 0, 0, diff --git a/eeschema/dialogs/dialog_print_using_printer.cpp b/eeschema/dialogs/dialog_print_using_printer.cpp index 704f9aad64..a0fc480a29 100644 --- a/eeschema/dialogs/dialog_print_using_printer.cpp +++ b/eeschema/dialogs/dialog_print_using_printer.cpp @@ -335,31 +335,9 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen ) // Change scale factor and offset to print the whole page. bool printReference = parent->GetPrintSheetReference(); - if( printReference ) - { - // Draw the page to a memory and let the dc calculate the drawing limits. - wxBitmap psuedoBitmap( 1, 1 ); - wxMemoryDC memDC; - memDC.SelectObject( psuedoBitmap ); - aScreen->Draw( panel, &memDC, GR_DEFAULT_DRAWMODE ); - parent->TraceWorkSheet( &memDC, aScreen, g_DrawDefaultLineThickness ); - - wxLogDebug( wxT( "MinX = %d, MaxX = %d, MinY = %d, MaxY = %d" ), - memDC.MinX(), memDC.MaxX(), memDC.MinY(), memDC.MaxY() ); - - pageSizeIU.x = memDC.MaxX() - memDC.MinX(); - pageSizeIU.y = memDC.MaxY() - memDC.MinY(); - - FitThisSizeToPageMargins( pageSizeIU, parent->GetPageSetupData() ); - fitRect = GetLogicalPageMarginsRect( parent->GetPageSetupData() ); - } - else - { - pageSizeIU = aScreen->GetPageSettings().GetSizeIU(); - - FitThisSizeToPaper( pageSizeIU ); - fitRect = GetLogicalPaperRect(); - } + pageSizeIU = aScreen->GetPageSettings().GetSizeIU(); + FitThisSizeToPaper( pageSizeIU ); + fitRect = GetLogicalPaperRect(); wxLogDebug( wxT( "Fit rectangle: %d, %d, %d, %d" ), fitRect.x, fitRect.y, fitRect.width, fitRect.height ); diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 1ce0b89136..8338ed362e 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -519,6 +519,8 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit if( !itemCurrentlyEdited ) // no track in progress: switch layer only { Other_Layer_Route( NULL, aDC ); + if( DisplayOpt.ContrastModeDisplay ) + m_canvas->Refresh(); break; }