Commit e1fb4c78 authored by charras's avatar charras
Browse files

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

(does not delete segments or does not deleting areas outlines)
parent 1312d15a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
+8 −5
Original line number Diff line number Diff line
@@ -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,15 +117,19 @@ 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 )
    {
        GetScreen()->SetModify();