Fixed an issue in Gerbview

This commit is contained in:
jean-pierre charras 2010-09-29 11:25:48 +02:00
parent 46b57190ff
commit 40b40ea5f4
4 changed files with 6 additions and 4 deletions

View File

@ -57,7 +57,6 @@ private:
public: public:
int m_Layer;
int m_Shape; // Shape and type of this gerber item int m_Shape; // Shape and type of this gerber item
wxPoint m_Start; // Line or arc start point or position of the shape wxPoint m_Start; // Line or arc start point or position of the shape
// for flashed items // for flashed items

View File

@ -27,7 +27,7 @@ void WinEDA_GerberFrame::Delete_DCode_Items( wxDC* DC,
if( dcode_value != gerb_item->m_DCode ) if( dcode_value != gerb_item->m_DCode )
continue; continue;
if( layer_number >= 0 && layer_number != gerb_item->m_Layer ) if( layer_number >= 0 && layer_number != gerb_item->GetLayer() )
continue; continue;
// TODO: Delete_Item( DC, item ); // TODO: Delete_Item( DC, item );

View File

@ -140,7 +140,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile,
for( ; item; item = item->Next() ) for( ; item; item = item->Next() )
{ {
GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
int layer = gerb_item->m_Layer; int layer = gerb_item->GetLayer();
int pcb_layer_number = LayerLookUpTable[layer]; int pcb_layer_number = LayerLookUpTable[layer];
if( pcb_layer_number < 0 || pcb_layer_number > LAST_NO_COPPER_LAYER ) if( pcb_layer_number < 0 || pcb_layer_number > LAST_NO_COPPER_LAYER )
continue; continue;

View File

@ -62,11 +62,14 @@ void WinEDA_GerberFrame::Erase_Current_Layer( bool query )
{ {
next = item->Next(); next = item->Next();
GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
if( gerb_item->m_Layer != layer ) if( gerb_item->GetLayer() != layer )
continue; continue;
gerb_item->DeleteStructure(); gerb_item->DeleteStructure();
} }
if( g_GERBER_List[layer] )
g_GERBER_List[layer]->InitToolTable();
ScreenPcb->SetModify(); ScreenPcb->SetModify();
ScreenPcb->SetRefreshReq(); ScreenPcb->SetRefreshReq();
} }