|
|
@ -160,11 +160,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin |
|
|
|
Connect( m_refreshTimer.GetId(), wxEVT_TIMER, |
|
|
|
wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onRefreshTimer ), nullptr, this ); |
|
|
|
|
|
|
|
// Set up timer to execute OnShow() method when the window appears on the screen
|
|
|
|
m_onShowTimer.SetOwner( this ); |
|
|
|
Connect( m_onShowTimer.GetId(), wxEVT_TIMER, |
|
|
|
wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onShowTimer ), nullptr, this ); |
|
|
|
m_onShowTimer.Start( 10 ); |
|
|
|
Connect( wxEVT_SHOW, wxShowEventHandler( EDA_DRAW_PANEL_GAL::onShowEvent ), nullptr, this ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -650,11 +646,10 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent ) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent ) |
|
|
|
void EDA_DRAW_PANEL_GAL::onShowEvent( wxShowEvent& aEvent ) |
|
|
|
{ |
|
|
|
if( m_gal && m_gal->IsInitialized() && m_gal->IsVisible() ) |
|
|
|
{ |
|
|
|
m_onShowTimer.Stop(); |
|
|
|
OnShow(); |
|
|
|
} |
|
|
|
} |
|
|
|