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

(does not delete segments or does not deleting areas outlines)
This commit is contained in:
charras 2009-02-19 14:57:15 +00:00
parent 1312d15afb
commit e1fb4c786f
2 changed files with 9 additions and 6 deletions

View File

@ -566,7 +566,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
if( ( GetCurItem() )->Type() == TYPE_ZONE_CONTAINER )
{
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() );
GetScreen()->SetModify();
DrawPanel->Refresh();

View File

@ -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
*/
{
int nb_segm = 0;
bool modify = false;
unsigned long TimeStamp;
@ -118,14 +117,18 @@ void WinEDA_PcbFrame::Delete_Zone_Fill( wxDC* DC, SEGZONE* aZone, long aTimestam
if( zone->m_TimeStamp == TimeStamp )
{
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 */
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 )
{