Gerbview: remove useless calls to SetToolbar() which create horizontal toolbar flicker under Windows.

This commit is contained in:
jean-pierre charras 2010-11-05 09:14:00 +01:00
parent a8d5e06818
commit 67894dd36e
5 changed files with 6 additions and 16 deletions

View File

@ -110,6 +110,5 @@ void WinEDA_GerberFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
wxSafeYield();
}
SetToolbars();
UpdateStatusBar();
}

View File

@ -217,6 +217,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
ReFillLayerWidget(); // this is near end because contents establish size
SetToolbars();
m_auimgr.Update();
}

View File

@ -47,6 +47,7 @@ bool WinEDA_GerberFrame::Clear_Pcb( bool query )
SetBaseScreen( ActiveScreen = ScreenPcb );
GetScreen()->Init();
setActiveLayer(LAYER_N_BACK);
syncLayerBox();
return TRUE;
}
@ -81,4 +82,5 @@ void WinEDA_GerberFrame::Erase_Current_Layer( bool query )
ScreenPcb->SetModify();
ScreenPcb->SetRefreshReq();
syncLayerBox();
}

View File

@ -17,9 +17,8 @@
bool WinEDA_GerberFrame::Read_GERBER_File( const wxString& GERBER_FullFileName,
const wxString& D_Code_FullFileName )
{
int G_commande = 0,
D_commande = 0; /* command number for G or D commands
* (like G04 or D02) */
int G_commande = 0; // command number for G commands like G04
int D_commande = 0; // command number for D commands like D02
char line[GERBER_BUFZ];
@ -57,7 +56,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( const wxString& GERBER_FullFileName,
SetLocaleTo_C_standard();
while( TRUE )
while( true )
{
if( fgets( line, sizeof(line), gerber->m_Current_File ) == NULL )
{

View File

@ -224,17 +224,6 @@ void WinEDA_GerberFrame::SetToolbars()
if( m_HToolBar == NULL )
return;
if( GetScreen()->m_BlockLocate.m_Command == BLOCK_MOVE )
{
m_HToolBar->EnableTool( wxID_CUT, true );
m_HToolBar->EnableTool( wxID_COPY, true );
}
else
{
m_HToolBar->EnableTool( wxID_CUT, false );
m_HToolBar->EnableTool( wxID_COPY, false );
}
if( m_SelLayerBox && (m_SelLayerBox->GetSelection() != screen->m_Active_Layer) )
{
m_SelLayerBox->SetSelection( screen->m_Active_Layer );