Fix edge case GERBER_FILE_IMAGE creation logic
This commit is contained in:
parent
b03ac1f614
commit
5292829e05
|
@ -45,16 +45,14 @@ bool GERBVIEW_FRAME::Read_GERBER_File( const wxString& GERBER_FullFileName )
|
||||||
GERBER_FILE_IMAGE_LIST* images = GetImagesList();
|
GERBER_FILE_IMAGE_LIST* images = GetImagesList();
|
||||||
GERBER_FILE_IMAGE* gerber = GetGbrImage( layer );
|
GERBER_FILE_IMAGE* gerber = GetGbrImage( layer );
|
||||||
|
|
||||||
if( gerber == NULL )
|
if( gerber != NULL )
|
||||||
{
|
|
||||||
gerber = new GERBER_FILE_IMAGE( layer );
|
|
||||||
images->AddGbrImage( gerber, layer );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Erase_Current_DrawLayer( false );
|
Erase_Current_DrawLayer( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gerber = new GERBER_FILE_IMAGE( layer );
|
||||||
|
images->AddGbrImage( gerber, layer );
|
||||||
|
|
||||||
/* Read the gerber file */
|
/* Read the gerber file */
|
||||||
bool success = gerber->LoadGerberFile( GERBER_FullFileName );
|
bool success = gerber->LoadGerberFile( GERBER_FullFileName );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue