Commit 477e98dc authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix 2 minor bugs:

* Pcbnew: in hight contrast mode the 'V' hotkey did not always refresh the screen.
* Eeschema: incorrect print scale when the option 'Show page limits' is disable.
parent aaa62cdd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
+3 −25
Original line number Diff line number Diff line
@@ -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();
    }

    wxLogDebug( wxT( "Fit rectangle: %d, %d, %d, %d" ),
                fitRect.x, fitRect.y, fitRect.width, fitRect.height );
+2 −0
Original line number Diff line number Diff line
@@ -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;
        }