Commit a68165d2 authored by Maciej Suminski's avatar Maciej Suminski

Minor changes (removed an unnecessary event handler and two function calls...

Minor changes (removed an unnecessary event handler and two function calls that had no real influence).
parent f56e2e14
...@@ -81,7 +81,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin ...@@ -81,7 +81,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
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_MIDDLE_DCLICK, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_DCLICK, 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 ) );
Connect( wxEVT_CHAR, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_CHAR, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this );
Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this );
Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE,
...@@ -158,7 +157,7 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent ) ...@@ -158,7 +157,7 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent )
} }
void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
{ {
if( m_pendingRefresh ) if( m_pendingRefresh )
return; return;
...@@ -279,10 +278,3 @@ void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent ) ...@@ -279,10 +278,3 @@ void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent )
// Getting focus is necessary in order to receive key events properly // Getting focus is necessary in order to receive key events properly
SetFocus(); SetFocus();
} }
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();
}
...@@ -108,7 +108,7 @@ public: ...@@ -108,7 +108,7 @@ public:
} }
/// @copydoc wxWindow::Refresh() /// @copydoc wxWindow::Refresh()
void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL );
/** /**
* Function SetEventDispatcher() * Function SetEventDispatcher()
...@@ -151,7 +151,6 @@ protected: ...@@ -151,7 +151,6 @@ protected:
void onEvent( wxEvent& aEvent ); void onEvent( wxEvent& aEvent );
void onEnter( wxEvent& aEvent ); void onEnter( wxEvent& aEvent );
void onRefreshTimer ( wxTimerEvent& aEvent ); void onRefreshTimer ( wxTimerEvent& aEvent );
void skipEvent( wxEvent& aEvent );
static const int MinRefreshPeriod = 17; ///< 60 FPS. static const int MinRefreshPeriod = 17; ///< 60 FPS.
......
...@@ -334,12 +334,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) : ...@@ -334,12 +334,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
SetGalCanvas( new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, SetGalCanvas( new PCB_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
PCB_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) ); PCB_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ) );
// GAL should not be active yet
GetGalCanvas()->StopDrawing();
// Hide by default, it has to be explicitly shown
GetGalCanvas()->Hide();
SetBoard( new BOARD() ); SetBoard( new BOARD() );
// Create the PCB_LAYER_WIDGET *after* SetBoard(): // Create the PCB_LAYER_WIDGET *after* SetBoard():
......
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