diff --git a/gerbview/class_gerber_draw_item.h b/gerbview/class_gerber_draw_item.h index 1d67d6edeb..aed31c94a2 100644 --- a/gerbview/class_gerber_draw_item.h +++ b/gerbview/class_gerber_draw_item.h @@ -57,7 +57,6 @@ private: public: - int m_Layer; int m_Shape; // Shape and type of this gerber item wxPoint m_Start; // Line or arc start point or position of the shape // for flashed items diff --git a/gerbview/deltrack.cpp b/gerbview/deltrack.cpp index 3d0789d850..17fcf523f6 100644 --- a/gerbview/deltrack.cpp +++ b/gerbview/deltrack.cpp @@ -27,7 +27,7 @@ void WinEDA_GerberFrame::Delete_DCode_Items( wxDC* DC, if( dcode_value != gerb_item->m_DCode ) continue; - if( layer_number >= 0 && layer_number != gerb_item->m_Layer ) + if( layer_number >= 0 && layer_number != gerb_item->GetLayer() ) continue; // TODO: Delete_Item( DC, item ); diff --git a/gerbview/export_to_pcbnew.cpp b/gerbview/export_to_pcbnew.cpp index 26ba5b13c6..cb2d20052e 100644 --- a/gerbview/export_to_pcbnew.cpp +++ b/gerbview/export_to_pcbnew.cpp @@ -140,7 +140,7 @@ static int SavePcbFormatAscii( WinEDA_GerberFrame* frame, FILE* aFile, for( ; item; item = item->Next() ) { 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]; if( pcb_layer_number < 0 || pcb_layer_number > LAST_NO_COPPER_LAYER ) continue; diff --git a/gerbview/initpcb.cpp b/gerbview/initpcb.cpp index e817a7cf2d..6756fa36bf 100644 --- a/gerbview/initpcb.cpp +++ b/gerbview/initpcb.cpp @@ -62,11 +62,14 @@ void WinEDA_GerberFrame::Erase_Current_Layer( bool query ) { next = item->Next(); GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item; - if( gerb_item->m_Layer != layer ) + if( gerb_item->GetLayer() != layer ) continue; gerb_item->DeleteStructure(); } + if( g_GERBER_List[layer] ) + g_GERBER_List[layer]->InitToolTable(); + ScreenPcb->SetModify(); ScreenPcb->SetRefreshReq(); }