Browse Source

Minor changes (removed an unnecessary event handler and two function calls that had no real influence).

pull/1/head
Maciej Suminski 11 years ago
parent
commit
a68165d2a0
  1. 10
      common/draw_panel_gal.cpp
  2. 3
      include/class_draw_panel_gal.h
  3. 6
      pcbnew/pcbframe.cpp

10
common/draw_panel_gal.cpp

@ -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_DCLICK, 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_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this );
Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE,
@ -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 )
return;
@ -279,10 +278,3 @@ void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent )
// Getting focus is necessary in order to receive key events properly
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();
}

3
include/class_draw_panel_gal.h

@ -108,7 +108,7 @@ public:
}
/// @copydoc wxWindow::Refresh()
void Refresh( bool eraseBackground = true, const wxRect* rect = NULL );
void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL );
/**
* Function SetEventDispatcher()
@ -151,7 +151,6 @@ protected:
void onEvent( wxEvent& aEvent );
void onEnter( wxEvent& aEvent );
void onRefreshTimer ( wxTimerEvent& aEvent );
void skipEvent( wxEvent& aEvent );
static const int MinRefreshPeriod = 17; ///< 60 FPS.

6
pcbnew/pcbframe.cpp

@ -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,
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() );
// Create the PCB_LAYER_WIDGET *after* SetBoard():

Loading…
Cancel
Save