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:
parent
1312d15afb
commit
e1fb4c786f
|
@ -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();
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue