Commit e1fb4c78 authored by charras's avatar charras

pcbnew: fixed: delete zones filling commands was inconsistant when filled by segments

(does not delete segments or does not deleting areas outlines)
parent 1312d15a
...@@ -566,7 +566,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -566,7 +566,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
if( ( GetCurItem() )->Type() == TYPE_ZONE_CONTAINER ) if( ( GetCurItem() )->Type() == TYPE_ZONE_CONTAINER )
{ {
ZONE_CONTAINER* zone_container = (ZONE_CONTAINER*) GetCurItem(); ZONE_CONTAINER* zone_container = (ZONE_CONTAINER*) GetCurItem();
zone_container->m_FilledPolysList.clear(); Delete_Zone_Fill( &dc, NULL, zone_container->m_TimeStamp );
test_1_net_connexion( NULL, zone_container->GetNet() ); test_1_net_connexion( NULL, zone_container->GetNet() );
GetScreen()->SetModify(); GetScreen()->SetModify();
DrawPanel->Refresh(); DrawPanel->Refresh();
......
...@@ -102,7 +102,6 @@ void WinEDA_PcbFrame::Delete_Zone_Fill( wxDC* DC, SEGZONE* aZone, long aTimestam ...@@ -102,7 +102,6 @@ void WinEDA_PcbFrame::Delete_Zone_Fill( wxDC* DC, SEGZONE* aZone, long aTimestam
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL * @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
*/ */
{ {
int nb_segm = 0;
bool modify = false; bool modify = false;
unsigned long TimeStamp; unsigned long TimeStamp;
...@@ -118,15 +117,19 @@ void WinEDA_PcbFrame::Delete_Zone_Fill( wxDC* DC, SEGZONE* aZone, long aTimestam ...@@ -118,15 +117,19 @@ void WinEDA_PcbFrame::Delete_Zone_Fill( wxDC* DC, SEGZONE* aZone, long aTimestam
if( zone->m_TimeStamp == TimeStamp ) if( zone->m_TimeStamp == TimeStamp )
{ {
modify = TRUE; modify = TRUE;
/* Erase segment from screen */
if( DC )
Trace_Une_Piste( DrawPanel, DC, zone, nb_segm, GR_XOR );
/* remove item from linked list and free memory */ /* remove item from linked list and free memory */
zone->DeleteStructure(); zone->DeleteStructure();
} }
} }
// Now delete the outlines of the corresponding copper areas
for( int ii = 0; ii < GetBoard()->GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = GetBoard()->GetArea( ii );
if( zone->m_TimeStamp == TimeStamp )
zone->m_FilledPolysList.clear();
}
if( modify ) if( modify )
{ {
GetScreen()->SetModify(); GetScreen()->SetModify();
......
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