2007-08-20 01:20:48 +00:00
|
|
|
/*********************************************/
|
2010-09-28 14:42:05 +00:00
|
|
|
/* Edit Track: Erase functions */
|
2007-08-20 01:20:48 +00:00
|
|
|
/*********************************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
#include "common.h"
|
|
|
|
|
2009-02-04 15:25:03 +00:00
|
|
|
#include "gerbview.h"
|
2010-09-28 14:42:05 +00:00
|
|
|
#include "class_gerber_draw_item.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
2009-11-09 14:00:22 +00:00
|
|
|
void WinEDA_GerberFrame::Delete_DCode_Items( wxDC* DC,
|
|
|
|
int dcode_value,
|
|
|
|
int layer_number )
|
2007-05-28 18:09:49 +00:00
|
|
|
{
|
2007-08-20 01:20:48 +00:00
|
|
|
if( dcode_value < FIRST_DCODE ) // No tool selected
|
|
|
|
return;
|
2009-01-05 05:21:35 +00:00
|
|
|
|
2010-09-28 14:42:05 +00:00
|
|
|
BOARD_ITEM* item = GetBoard()->m_Drawings;
|
|
|
|
BOARD_ITEM * next;
|
|
|
|
for( ; item; item = next )
|
2007-08-20 01:20:48 +00:00
|
|
|
{
|
2010-09-28 14:42:05 +00:00
|
|
|
next = item->Next();
|
|
|
|
GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
|
2009-01-05 05:21:35 +00:00
|
|
|
|
2010-09-28 14:42:05 +00:00
|
|
|
if( dcode_value != gerb_item->m_DCode )
|
2007-08-20 01:20:48 +00:00
|
|
|
continue;
|
2009-01-05 05:21:35 +00:00
|
|
|
|
2010-09-29 09:25:48 +00:00
|
|
|
if( layer_number >= 0 && layer_number != gerb_item->GetLayer() )
|
2007-08-20 01:20:48 +00:00
|
|
|
continue;
|
2009-01-05 05:21:35 +00:00
|
|
|
|
2010-09-28 14:42:05 +00:00
|
|
|
// TODO: Delete_Item( DC, item );
|
2007-08-20 01:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GetScreen()->SetCurItem( NULL );
|
2007-05-28 18:09:49 +00:00
|
|
|
}
|
|
|
|
|