Commit 1901a379 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Gerbview: remove flicker when refresh screen. Pcbnew fix (partially) issue...

Gerbview: remove flicker when refresh screen. Pcbnew fix (partially) issue when printing in mirror mode ( version compiled  with USE_WX_ZOOM = ON specific). Minor enhancements.
parents d18ce728 7d85aa92
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -93,11 +93,9 @@ void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event )
    int id = event.GetId();

    wxGetApp().SetLanguageIdentifier( id );
    if ( wxGetApp().SetLanguage() )
    {
    wxGetApp().SetLanguage();
    ReCreateMenuBar();
        Refresh();
    }
    GetMenuBar()->Refresh();
}


+7 −6
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
{
#define WSTEXTSIZE 50   // Text size in mils
    Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc;
    int           xg, yg, ipas, gxpas, gypas;
    int           xg, yg;
    wxSize        PageSize;
    wxPoint       pos, ref;
    EDA_Colors    color;
@@ -36,10 +36,11 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
    wxSize   text_size2;
    wxSize   text_size3;
    wxSize   text_size1_5;
#endif
#else
    int      UpperLimit = VARIABLE_BLOCK_START_POSITION;
    bool     italic     = false;
    bool     bold = false;
#endif
    bool     italic     = false;
    bool     thickness = 0;      //@todo : use current pen

    color = BLACK;
@@ -150,8 +151,8 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
#else

    /* Plot legend along the X axis. */
    ipas  = ( xg - ref.x ) / PAS_REF;
    gxpas = ( xg - ref.x ) / ipas;
    int ipas  = ( xg - ref.x ) / PAS_REF;
    int gxpas = ( xg - ref.x ) / ipas;
    for( int ii = ref.x + gxpas, jj = 1; ipas > 0; ii += gxpas, jj++, ipas-- )
    {
        msg.Empty();
@@ -193,7 +194,7 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )

    /* Plot legend along the Y axis. */
    ipas  = ( yg - ref.y ) / PAS_REF;
    gypas = (  yg - ref.y ) / ipas;
    int gypas = (  yg - ref.y ) / ipas;
    for( int ii = ref.y + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- )
    {
        if( jj < 26 )
+10 −2
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id,
    m_AbortEnable       = m_AbortRequest = false;
    m_AutoPAN_Enable    = TRUE;
    m_IgnoreMouseEvents = 0;
    m_DisableEraseBG    = false;

    ManageCurseur = NULL;
    ForceCloseManageCurseur = NULL;
@@ -673,7 +674,7 @@ void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event )
    // call ~wxDCClipper() before ~wxPaintDC()
    {
        wxDCClipper dcclip( paintDC, PaintClipBox );
        ReDraw( &paintDC, true );
        ReDraw( &paintDC, m_DisableEraseBG ? false : true );
    }

    m_ClipBox = tmp;
@@ -914,6 +915,13 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
        tmpDC.DrawPoint( 0, ypos );
    }

    // Use the layer bitmap itself as a mask when blitting.
    // The bitmap cannot be referenced by a device context
    // when setting the mask.
    tmpDC.SelectObject( wxNullBitmap );
    tmpBM.SetMask( new wxMask( tmpBM, MakeColour( g_DrawBgColor ) ) );
    tmpDC.SelectObject( tmpBM );

    ypos = GRMapY( org.y );
    for( ii = 0; ; ii += increment )
    {
@@ -925,7 +933,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
            continue;
        if( xpos > m_ClipBox.GetEnd().x)    // end of active area reached.
            break;
        DC->Blit( xpos, ypos, 1, screenSize.y, &tmpDC, 0, 0  );
        DC->Blit( xpos, ypos, 1, screenSize.y, &tmpDC, 0, 0, wxCOPY, true  );
    }

#endif
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
     * use Refresh() and update() do not change problems
     */
    INSTALL_DC( dc, DrawPanel );
    DrawPanel->ReDraw( &dc );
    DrawPanel->ReDraw( &dc, DrawPanel->m_DisableEraseBG ? false : true );

    /* Move the mouse cursor to the on grid graphic cursor position */
    if( ToMouse == TRUE )
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ set(CVPCB_SRCS
    listboxes.cpp
    listlib.cpp
    loadcmp.cpp
    menucfg.cpp
    menubar.cpp
    readschematicnetlist.cpp
    savecmp.cpp
    setvisu.cpp
Loading