Commit 5114b863 authored by stambaughw's avatar stambaughw
Browse files

EESchema UI normalization and configuration updates and Gerbview parser bug fix.

* All - add wxList implementation for dynamic declaration of application settings.
* EESchema: remove non-standard fonts and dialog button text colors from all UI controls.
* EESchema: update project file and application settings from static to dynamic method.
* EESchema: save and restore show hidden pins state between sessions.
* EESchema: global variable reductions.
* EESchema: use EVT_UPDATE_UI instead of SetToolbars() to set control states.
* EESchema: remove unused DialogBlocks BOM dialog project file.
* GerbView: remove non-standard fonts and dialog button text colors from all UI controls.
* GerbView: fix infinite loop when parsing RS274X aperture definitions with whitespace.
* GerbView: add file name to export to PCBNew select layer dialog.
parent 1ec2841c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -116,7 +116,9 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
    wxPoint curpos = ScreenPos;
    Unscale( curpos );

#ifndef WX_ZOOM
    curpos += m_DrawOrg;
#endif

    return curpos;
}
+4 −4
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* parent, const wxString& title,
    m_MoveFct  = movefct;
    m_WinMsg   = NULL;
    SetReturnCode( -1 );
    SetFont( *g_DialogFont );

    if( itemlist )
        for( names = m_ItemList, ii = 0; *names != NULL; names++ )
@@ -114,9 +113,10 @@ WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* parent, const wxString& title,

    if( m_MoveFct )
    {
        size.x   = -1; size.y = 60;
        m_WinMsg = new wxTextCtrl( this, -1, wxEmptyString, wxDefaultPosition, size,
                                   wxTE_READONLY | wxTE_MULTILINE );
        size.x   = -1;
        size.y   = 60;
        m_WinMsg = new wxTextCtrl( this, -1, wxEmptyString, wxDefaultPosition,
                                   size, wxTE_READONLY | wxTE_MULTILINE );

        GeneralBoxSizer->Add( m_WinMsg, 0, wxGROW | wxALL, 5 );
    }
+5 −0
Original line number Diff line number Diff line
@@ -630,6 +630,11 @@ void WinEDA_DrawFrame::AdjustScrollBars()
                              screen->m_ScrollbarNumber.y,
                              screen->m_ScrollbarPos.x,
                              screen->m_ScrollbarPos.y, TRUE );
#else
    BASE_SCREEN* screen = GetBaseScreen();
    wxSize drawingSize = screen->ReturnPageSize() * 2;
    DrawPanel->SetScrollbars( 1, 1, drawingSize.x, drawingSize.y,
                              screen->m_Curseur.x, screen->m_Curseur.y, true );
#endif
}

+36 −5
Original line number Diff line number Diff line
@@ -222,7 +222,16 @@ wxPoint WinEDA_DrawPanel::CursorRealPosition( const wxPoint& ScreenPos )
 * @param  ScreenPos = absolute position in pixels
 */
{
#ifdef WX_ZOOM
    wxCoord x, y;
    wxClientDC DC( this );
    PrepareGraphicContext( &DC );
    x = DC.DeviceToLogicalX( ScreenPos.x );
    y = DC.DeviceToLogicalY( ScreenPos.y );
    return wxPoint( x, y );
#else
    return GetScreen()->CursorRealPosition( ScreenPos );
#endif
}


@@ -323,17 +332,23 @@ void WinEDA_DrawPanel::ConvertPcbUnitsToPixelsUnits( wxPoint* aPosition )
}


/********************************************************/
wxPoint WinEDA_DrawPanel::CursorScreenPosition()
/********************************************************/

/** Function CursorScreenPosition
 * @return the cursor current position in pixels in the screen draw area
 */
wxPoint WinEDA_DrawPanel::CursorScreenPosition()
{
#ifdef WX_ZOOM
    wxCoord x, y;
    wxClientDC DC( this );
    PrepareGraphicContext( &DC );
    x = DC.LogicalToDeviceX( GetScreen()->m_Curseur.x );
    y = DC.LogicalToDeviceY( GetScreen()->m_Curseur.y );
    return wxPoint( x, y );
#else
    wxPoint pos = GetScreen()->m_Curseur - GetScreen()->m_DrawOrg;
    GetScreen()->Scale( pos );
    return pos;
#endif
}


@@ -352,8 +367,16 @@ wxPoint WinEDA_DrawPanel::GetScreenCenterRealPosition( void )
    realpos = CalcUnscrolledPosition( wxPoint( size.x, size.y ) );

    GetScreen()->Unscale( realpos );
#ifdef WX_ZOOM
    wxCoord x, y;
    wxClientDC DC( this );
    PrepareGraphicContext( &DC );
    x = DC.DeviceToLogicalX( realpos.x );
    y = DC.DeviceToLogicalY( realpos.y );
    return wxPoint( x, y );
#else
    realpos += GetScreen()->m_DrawOrg;

#endif
    return realpos;
}

@@ -648,6 +671,10 @@ void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event )
        wxDCClipper dcclip( paintDC, PaintClipBox );

        ReDraw( &paintDC, true );

#ifdef WX_ZOOM
        paintDC.SetUserScale( 1.0, 1.0 );
#endif
    }

    m_ClipBox = tmp;
@@ -1284,7 +1311,11 @@ void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event )
    }

    /* Some key commands use the current mouse position: refresh it */
#ifdef WX_ZOOM
    pos = CalcUnscrolledPosition( wxGetMousePosition() );
#else
    pos = CalcUnscrolledPosition( wxGetMousePosition() - GetScreenPosition() );
#endif

    /* Compute absolute mouse position in pixel units (i.e. considering the
       current scroll) : */
+1 −0
Original line number Diff line number Diff line
@@ -697,6 +697,7 @@ void WinEDA_App::SaveSettings()
    m_EDA_Config->Write( wxT( "FixedFontSize" ), g_FixedFontPointSize );
    m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
    m_EDA_Config->Write( wxT( "WorkingDir" ), wxGetCwd() );
    m_EDA_Config->Write( wxT( "BgColor" ), g_DrawBgColor );
#endif // wxCHECK_VERSION

    /* Save the file history list */
Loading