Commit ac749856 authored by jean-pierre charras's avatar jean-pierre charras

All: fix hotkey issue with wxWidgets-2.9.3 (Window only): hotkey events called twice.

 * Fix compil issue about automatically created pcb_plot_params.h :
     pcb_plot_params.* moved from pcbnew to common because item_io.cpp (using this file) is compiled in common.
parent 1047e60e
...@@ -105,6 +105,7 @@ set(PCB_COMMON_SRCS ...@@ -105,6 +105,7 @@ set(PCB_COMMON_SRCS
../pcbnew/classpcb.cpp ../pcbnew/classpcb.cpp
../pcbnew/collectors.cpp ../pcbnew/collectors.cpp
../pcbnew/sel_layer.cpp ../pcbnew/sel_layer.cpp
pcb_plot_params_keywords.cpp
) )
...@@ -125,6 +126,14 @@ make_lexer( ...@@ -125,6 +126,14 @@ make_lexer(
NL_T 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. # The dsntest may not build properly using MS Visual Studio.
if(NOT MSVC) if(NOT MSVC)
# This one gets made only when testing. # This one gets made only when testing.
......
...@@ -1161,26 +1161,6 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) ...@@ -1161,26 +1161,6 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
GetParent()->GeneralControl( &DC, pos, localkey ); 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
} }
......
...@@ -77,7 +77,6 @@ int g_TabAllCopperLayerMask[NB_COPPER_LAYERS] = { ...@@ -77,7 +77,6 @@ int g_TabAllCopperLayerMask[NB_COPPER_LAYERS] = {
DISPLAY_OPTIONS DisplayOpt; /* Display options for board items */ DISPLAY_OPTIONS DisplayOpt; /* Display options for board items */
/* PCB file name extension definitions. */ /* PCB file name extension definitions. */
wxString g_SaveFileName( wxT( "$savepcb" ) );
wxString NetExtBuffer( wxT( "net" ) ); wxString NetExtBuffer( wxT( "net" ) );
wxString NetCmpExtBuffer( wxT( "cmp" ) ); wxString NetCmpExtBuffer( wxT( "cmp" ) );
wxString g_Shapes3DExtBuffer( wxT( "wrl" ) ); wxString g_Shapes3DExtBuffer( wxT( "wrl" ) );
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
#include "dlist.h" #include "dlist.h"
#include "layers_id_colors_and_visibility.h" // LAYER_COUNT and NB_COPPER_LAYERS definitions. #include "layers_id_colors_and_visibility.h" // LAYER_COUNT and NB_COPPER_LAYERS definitions.
#include <wx/string.h> // wxString class. //#include <wx/string.h> // wxString class.
#include <wx/arrstr.h> // wxArrayString class. //#include <wx/arrstr.h> // wxArrayString class.
#define MIN_DRAW_WIDTH 1 /* Minimum trace drawing width. */ #define MIN_DRAW_WIDTH 1 /* Minimum trace drawing width. */
class PCB_SCREEN; //class PCB_SCREEN;
class D_PAD; class D_PAD;
class TRACK; class TRACK;
class BOARD; class BOARD;
...@@ -35,15 +35,12 @@ extern int g_TabAllCopperLayerMask[NB_COPPER_LAYERS]; ...@@ -35,15 +35,12 @@ extern int g_TabAllCopperLayerMask[NB_COPPER_LAYERS];
extern DISPLAY_OPTIONS DisplayOpt; extern DISPLAY_OPTIONS DisplayOpt;
extern wxString g_SaveFileName;
extern wxString NetExtBuffer; extern wxString NetExtBuffer;
extern wxString NetCmpExtBuffer; extern wxString NetCmpExtBuffer;
extern const wxString ModuleFileExtension; extern const wxString ModuleFileExtension;
extern const wxString ModuleFileWildcard; extern const wxString ModuleFileWildcard;
extern wxString g_ViaType_Name[4];
extern int g_CurrentVersionPCB; extern int g_CurrentVersionPCB;
extern int g_RotationAngle; extern int g_RotationAngle;
......
...@@ -149,7 +149,6 @@ set(PCBNEW_SRCS ...@@ -149,7 +149,6 @@ set(PCBNEW_SRCS
onleftclick.cpp onleftclick.cpp
onrightclick.cpp onrightclick.cpp
pcb_plot_params.cpp pcb_plot_params.cpp
pcb_plot_params_keywords.cpp
pcbnew.cpp pcbnew.cpp
pcbnew_config.cpp pcbnew_config.cpp
pcbplot.cpp pcbplot.cpp
...@@ -250,15 +249,6 @@ make_lexer( ...@@ -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 # Create the pcbnew executable
### ###
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
static const wxString pcbBackupFileExtension( wxT( "000" ) ); static const wxString pcbBackupFileExtension( wxT( "000" ) );
static wxString saveFileName( wxT( "$savepcb" ) );
void PCB_EDIT_FRAME::OnFileHistory( wxCommandEvent& event ) void PCB_EDIT_FRAME::OnFileHistory( wxCommandEvent& event )
...@@ -93,7 +94,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event ) ...@@ -93,7 +94,7 @@ void PCB_EDIT_FRAME::Files_io( wxCommandEvent& event )
if( id == ID_MENU_RECOVER_BOARD ) if( id == ID_MENU_RECOVER_BOARD )
{ {
fn = wxFileName( wxEmptyString, g_SaveFileName, PcbFileExtension ); fn = wxFileName( wxEmptyString, saveFileName, PcbFileExtension );
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment