Commit b9049c50 authored by CHARRAS's avatar CHARRAS

gerbview enhancement: complements

parent bcd7a739
...@@ -191,8 +191,6 @@ void WinEDA_GerberFrame::Erase_Textes_Pcb( wxDC* DC, bool query ) ...@@ -191,8 +191,6 @@ void WinEDA_GerberFrame::Erase_Textes_Pcb( wxDC* DC, bool query )
void WinEDA_GerberFrame::Erase_Current_Layer( wxDC* DC, bool query ) void WinEDA_GerberFrame::Erase_Current_Layer( wxDC* DC, bool query )
/*******************************************************************/ /*******************************************************************/
{ {
TRACK* pt_segm;
BOARD_ITEM* PtNext;
int layer = GetScreen()->m_Active_Layer; int layer = GetScreen()->m_Active_Layer;
wxString msg; wxString msg;
...@@ -200,8 +198,9 @@ void WinEDA_GerberFrame::Erase_Current_Layer( wxDC* DC, bool query ) ...@@ -200,8 +198,9 @@ void WinEDA_GerberFrame::Erase_Current_Layer( wxDC* DC, bool query )
if( query && !IsOK( this, msg ) ) if( query && !IsOK( this, msg ) )
return; return;
/* Marquage des pistes a effacer */ /* Delete tracks (spots and lines) */
for( pt_segm = m_Pcb->m_Track; pt_segm != NULL; pt_segm = (TRACK*) PtNext ) TRACK* PtNext;
for( TRACK* pt_segm = m_Pcb->m_Track; pt_segm != NULL; pt_segm = (TRACK*) PtNext )
{ {
PtNext = pt_segm->Next(); PtNext = pt_segm->Next();
if( pt_segm->GetLayer() != layer ) if( pt_segm->GetLayer() != layer )
...@@ -209,6 +208,15 @@ void WinEDA_GerberFrame::Erase_Current_Layer( wxDC* DC, bool query ) ...@@ -209,6 +208,15 @@ void WinEDA_GerberFrame::Erase_Current_Layer( wxDC* DC, bool query )
pt_segm->DeleteStructure(); pt_segm->DeleteStructure();
} }
/* Delete polygons */
SEGZONE* Nextzone;
for( SEGZONE* zone = m_Pcb->m_Zone; zone != NULL; zone = Nextzone )
{
Nextzone = zone->Next();
if( zone->GetLayer() != layer )
continue;
zone->DeleteStructure();
}
ScreenPcb->SetModify(); ScreenPcb->SetModify();
ScreenPcb->SetRefreshReq(); ScreenPcb->SetRefreshReq();
} }
...@@ -88,8 +88,8 @@ int id = event.GetId(); ...@@ -88,8 +88,8 @@ int id = event.GetId();
case ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH: case ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH:
if ( m_OptionsToolBar->GetToolState(id) ) // Polygons filled asked if ( m_OptionsToolBar->GetToolState(id) ) // Polygons filled asked
g_DisplayPolygonsModeSketch = 0; g_DisplayPolygonsModeSketch = 1;
else g_DisplayPolygonsModeSketch = 1; else g_DisplayPolygonsModeSketch = 0;
DrawPanel->Refresh(TRUE); DrawPanel->Refresh(TRUE);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment