diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index afac4eb1d9..7414db0bf2 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -105,6 +105,7 @@ set(PCB_COMMON_SRCS ../pcbnew/classpcb.cpp ../pcbnew/collectors.cpp ../pcbnew/sel_layer.cpp + pcb_plot_params_keywords.cpp ) @@ -125,6 +126,14 @@ make_lexer( NL_T ) +# auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp +make_lexer( + ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params.keywords + ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_lexer.h + ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp + PCBPLOTPARAMS_T + ) + # The dsntest may not build properly using MS Visual Studio. if(NOT MSVC) # This one gets made only when testing. diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index c0f04478fa..ccf1acd3fd 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -1161,26 +1161,6 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) GetParent()->GeneralControl( &DC, pos, localkey ); -#ifdef __WINDOWS__ - // Disable the default scrolling command keys which break KiCad's zooming and - // panning. This is also likely the reason skip was disabled for other platforms. - // There probably needs to be some more investigation done here. - switch( event.GetKeyCode() ) - { - case WXK_HOME: - case WXK_END: - case WXK_PAGEUP: - case WXK_PAGEDOWN: - case WXK_UP: - case WXK_DOWN: - case WXK_LEFT: - case WXK_RIGHT: - break; - - default: - event.Skip(); // Allow menu shortcut processing on Windows. - } -#endif } diff --git a/pcbnew/pcb_plot_params.keywords b/common/pcb_plot_params.keywords similarity index 100% rename from pcbnew/pcb_plot_params.keywords rename to common/pcb_plot_params.keywords diff --git a/common/pcbcommon.cpp b/common/pcbcommon.cpp index 5b04e63e50..32159649a0 100644 --- a/common/pcbcommon.cpp +++ b/common/pcbcommon.cpp @@ -77,7 +77,6 @@ int g_TabAllCopperLayerMask[NB_COPPER_LAYERS] = { DISPLAY_OPTIONS DisplayOpt; /* Display options for board items */ /* PCB file name extension definitions. */ -wxString g_SaveFileName( wxT( "$savepcb" ) ); wxString NetExtBuffer( wxT( "net" ) ); wxString NetCmpExtBuffer( wxT( "cmp" ) ); wxString g_Shapes3DExtBuffer( wxT( "wrl" ) ); diff --git a/include/pcbcommon.h b/include/pcbcommon.h index 42170c05de..5f0683957e 100644 --- a/include/pcbcommon.h +++ b/include/pcbcommon.h @@ -9,14 +9,14 @@ #include "dlist.h" #include "layers_id_colors_and_visibility.h" // LAYER_COUNT and NB_COPPER_LAYERS definitions. -#include // wxString class. -#include // wxArrayString class. +//#include // wxString class. +//#include // wxArrayString class. #define MIN_DRAW_WIDTH 1 /* Minimum trace drawing width. */ -class PCB_SCREEN; +//class PCB_SCREEN; class D_PAD; class TRACK; class BOARD; @@ -35,15 +35,12 @@ extern int g_TabAllCopperLayerMask[NB_COPPER_LAYERS]; extern DISPLAY_OPTIONS DisplayOpt; -extern wxString g_SaveFileName; extern wxString NetExtBuffer; extern wxString NetCmpExtBuffer; extern const wxString ModuleFileExtension; extern const wxString ModuleFileWildcard; -extern wxString g_ViaType_Name[4]; - extern int g_CurrentVersionPCB; extern int g_RotationAngle; diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index ca05e4661f..2f33104443 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -149,7 +149,6 @@ set(PCBNEW_SRCS onleftclick.cpp onrightclick.cpp pcb_plot_params.cpp - pcb_plot_params_keywords.cpp pcbnew.cpp pcbnew_config.cpp pcbplot.cpp @@ -250,15 +249,6 @@ make_lexer( ) -# auto-generate pcb_plot_params_lexer.h and pcb_plot_params_keywords.cpp -make_lexer( - ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params.keywords - ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_lexer.h - ${CMAKE_CURRENT_SOURCE_DIR}/pcb_plot_params_keywords.cpp - PCBPLOTPARAMS_T - ) - - ### # Create the pcbnew executable ### diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index 2768c616a3..527c34b7ee 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -51,6 +51,7 @@ static const wxString pcbBackupFileExtension( wxT( "000" ) ); +static wxString saveFileName( wxT( "$savepcb" ) ); void PCB_EDIT_FRAME::OnFileHistory( wxCommandEvent& event ) @@ -93,7 +94,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) if( id == ID_MENU_RECOVER_BOARD ) { - fn = wxFileName( wxEmptyString, g_SaveFileName, PcbFileExtension ); + fn = wxFileName( wxEmptyString, saveFileName, PcbFileExtension ); } else {