Loading common/drawpanel_gal.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -87,9 +87,11 @@ 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_DOWN, 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_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); 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_ENTER_WINDOW, wxEventHandler (EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); this->SetFocus(); } Loading Loading @@ -210,6 +212,11 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) } void EDA_DRAW_PANEL_GAL::onEnter ( wxEvent& aEvent ) { SetFocus(); } void EDA_DRAW_PANEL_GAL::skipEvent( wxEvent& aEvent ) { // This is necessary for CHAR_HOOK event to generate KEY_UP and KEY_DOWN events Loading include/class_drawpanel_gal.h +3 −2 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); void onEvent( wxEvent& aEvent ); void onEnter( wxEvent& aEvent ); void skipEvent( wxEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface Loading Loading
common/drawpanel_gal.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -87,9 +87,11 @@ 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_DOWN, 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_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); 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_ENTER_WINDOW, wxEventHandler (EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); this->SetFocus(); } Loading Loading @@ -210,6 +212,11 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) } void EDA_DRAW_PANEL_GAL::onEnter ( wxEvent& aEvent ) { SetFocus(); } void EDA_DRAW_PANEL_GAL::skipEvent( wxEvent& aEvent ) { // This is necessary for CHAR_HOOK event to generate KEY_UP and KEY_DOWN events Loading
include/class_drawpanel_gal.h +3 −2 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); void onEvent( wxEvent& aEvent ); void onEnter( wxEvent& aEvent ); void skipEvent( wxEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface Loading