kicad/gerbview/deltrack.cpp

38 lines
962 B
C++
Raw Normal View History

/*********************************************/
2010-09-28 14:42:05 +00:00
/* Edit Track: Erase functions */
/*********************************************/
#include "fctsys.h"
#include "common.h"
#include "gerbview.h"
2010-09-28 14:42:05 +00:00
#include "class_gerber_draw_item.h"
void WinEDA_GerberFrame::Delete_DCode_Items( wxDC* DC,
int dcode_value,
int layer_number )
{
if( dcode_value < FIRST_DCODE ) // No tool selected
return;
2010-09-28 14:42:05 +00:00
BOARD_ITEM* item = GetBoard()->m_Drawings;
BOARD_ITEM * next;
for( ; item; item = next )
{
2010-09-28 14:42:05 +00:00
next = item->Next();
GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
2010-09-28 14:42:05 +00:00
if( dcode_value != gerb_item->m_DCode )
continue;
2010-09-29 09:25:48 +00:00
if( layer_number >= 0 && layer_number != gerb_item->GetLayer() )
continue;
2010-09-28 14:42:05 +00:00
// TODO: Delete_Item( DC, item );
}
GetScreen()->SetCurItem( NULL );
}