Commit f1b0ffd3 authored by Maciej Suminski's avatar Maciej Suminski

Changed focus owner of LayerWidget to EDA_DRAW_PANEL_GAL to make keyboard...

Changed focus owner of LayerWidget to EDA_DRAW_PANEL_GAL to make keyboard events work (apparently everything works fine, to be tested more extensively).
Removed unnecessary event hook from EDA_DRAW_PANEL_GAL.
parent c012554d
...@@ -87,7 +87,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin ...@@ -87,7 +87,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ), NULL, this );
Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
} }
...@@ -208,10 +207,3 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) ...@@ -208,10 +207,3 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent )
Refresh(); Refresh();
} }
void EDA_DRAW_PANEL_GAL::skipEvent( wxEvent& aEvent )
{
// This is necessary for CHAR_HOOK event to generate KEY_UP and KEY_DOWN events
aEvent.Skip();
}
...@@ -115,7 +115,6 @@ protected: ...@@ -115,7 +115,6 @@ protected:
void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onPaint( wxPaintEvent& WXUNUSED( aEvent ) );
void onSize( wxSizeEvent& aEvent ); void onSize( wxSizeEvent& aEvent );
void onEvent( wxEvent& aEvent ); void onEvent( wxEvent& aEvent );
void skipEvent( wxEvent& aEvent );
KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface
KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.)
......
...@@ -333,7 +333,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, ...@@ -333,7 +333,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title,
if( screenHeight <= 900 ) if( screenHeight <= 900 )
pointSize = (pointSize * 8) / 10; pointSize = (pointSize * 8) / 10;
m_Layers = new PCB_LAYER_WIDGET( this, m_canvas, pointSize ); m_Layers = new PCB_LAYER_WIDGET( this, m_galCanvas, pointSize );
m_drc = new DRC( this ); // these 2 objects point to each other m_drc = new DRC( this ); // these 2 objects point to each other
......
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