You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
962 B

  1. /*********************************************/
  2. /* Edit Track: Erase functions */
  3. /*********************************************/
  4. #include "fctsys.h"
  5. #include "common.h"
  6. #include "gerbview.h"
  7. #include "class_gerber_draw_item.h"
  8. void WinEDA_GerberFrame::Delete_DCode_Items( wxDC* DC,
  9. int dcode_value,
  10. int layer_number )
  11. {
  12. if( dcode_value < FIRST_DCODE ) // No tool selected
  13. return;
  14. BOARD_ITEM* item = GetBoard()->m_Drawings;
  15. BOARD_ITEM * next;
  16. for( ; item; item = next )
  17. {
  18. next = item->Next();
  19. GERBER_DRAW_ITEM* gerb_item = (GERBER_DRAW_ITEM*) item;
  20. if( dcode_value != gerb_item->m_DCode )
  21. continue;
  22. if( layer_number >= 0 && layer_number != gerb_item->GetLayer() )
  23. continue;
  24. // TODO: Delete_Item( DC, item );
  25. }
  26. GetScreen()->SetCurItem( NULL );
  27. }