Commit e88bc8e5 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

LEGACY_PLUGIN is now in full use:

*) for footprint access into *.mod files and 
*) BOARD save/load

The item_io.cpp and ioascii.cpp have been set off to the side for reference
as *.notused, for awhile.

The CMake options USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE are gone,
this is now the mandatory usage of the LEGACY_PLUGIN.  This should reduce
code maintenance for awhile until the s-expression plugin comes into 
play.  But at least for legacy format, there is not two code bodies
to maintain any more.

A new LEGACY_PLUGIN footprint library caching scheme is in place which 
needs some testing.  It should not be any faster, but might give better 
results in a networked environment if there is *.mod files on the server.
parents bf5802f1 51a83a7a
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -23,8 +23,6 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
option(USE_PCBNEW_SEXPR_FILE_FORMAT
option(USE_PCBNEW_SEXPR_FILE_FORMAT
       "Use s-expression Pcbnew file format support (default OFF)." )
       "Use s-expression Pcbnew file format support (default OFF)." )


option(USE_NEW_PCBNEW_LOAD "use new plugin support for legacy file format" ON)
option(USE_NEW_PCBNEW_SAVE "use new plugin support for legacy file format" ON)
option(USE_PCBNEW_NANOMETRES
option(USE_PCBNEW_NANOMETRES
       "Use nanometers for Pcbnew internal units instead of deci-mils (default OFF).")
       "Use nanometers for Pcbnew internal units instead of deci-mils (default OFF).")


+0 −2
Original line number Original line Diff line number Diff line
@@ -55,8 +55,6 @@


#cmakedefine USE_IMAGES_IN_MENUS 1
#cmakedefine USE_IMAGES_IN_MENUS 1


#cmakedefine USE_NEW_PCBNEW_LOAD
#cmakedefine USE_NEW_PCBNEW_SAVE
#cmakedefine USE_PCBNEW_NANOMETRES
#cmakedefine USE_PCBNEW_NANOMETRES
#cmakedefine USE_PCBNEW_SEXPR_FILE_FORMAT
#cmakedefine USE_PCBNEW_SEXPR_FILE_FORMAT


+3 −11
Original line number Original line Diff line number Diff line
@@ -116,21 +116,13 @@ set(PCB_COMMON_SRCS
    ../pcbnew/collectors.cpp
    ../pcbnew/collectors.cpp
    ../pcbnew/sel_layer.cpp
    ../pcbnew/sel_layer.cpp
    ../pcbnew/pcb_plot_params.cpp
    ../pcbnew/pcb_plot_params.cpp
    pcb_plot_params_keywords.cpp
    dialogs/dialog_page_settings.cpp
)

if( USE_NEW_PCBNEW_LOAD OR USE_NEW_PCBNEW_SAVE )
    set( PCB_COMMON_SRCS
         ${PCB_COMMON_SRCS}
         ../pcbnew/item_io.cpp
    ../pcbnew/io_mgr.cpp
    ../pcbnew/io_mgr.cpp
    ../pcbnew/legacy_plugin.cpp
    ../pcbnew/legacy_plugin.cpp
    ../pcbnew/kicad_plugin.cpp
    ../pcbnew/kicad_plugin.cpp
    pcb_plot_params_keywords.cpp
    dialogs/dialog_page_settings.cpp
)
)
else()

    set( PCB_COMMON_SRCS ${PCB_COMMON_SRCS} ../pcbnew/item_io.cpp )
endif()


# add -DPCBNEW to compilation of these PCBNEW sources
# add -DPCBNEW to compilation of these PCBNEW sources
set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
+0 −9
Original line number Original line Diff line number Diff line
@@ -111,15 +111,6 @@ void BASE_SCREEN::SetScalingFactor(double aScale )
}
}




void BASE_SCREEN::SetZoomList( const wxArrayDouble& zoomlist )
{
    if( !m_ZoomList.IsEmpty() )
        m_ZoomList.Empty();

    m_ZoomList = zoomlist;
}


bool BASE_SCREEN::SetFirstZoom()
bool BASE_SCREEN::SetFirstZoom()
{
{
    if( m_ZoomList.IsEmpty() )
    if( m_ZoomList.IsEmpty() )
+1 −1
Original line number Original line Diff line number Diff line
@@ -368,7 +368,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
    else
    else
    {
    {
        id--;
        id--;
        int selectedZoom = GetScreen()->m_ZoomList[id];
        double selectedZoom = GetScreen()->m_ZoomList[id];


        if( GetScreen()->GetZoom() == selectedZoom )
        if( GetScreen()->GetZoom() == selectedZoom )
            return;
            return;
Loading