Refill zones after editing properties

After editing properties (in Legacy or GAL) using the dialog, zones are
not refilled.

Fixes: lp:1674595
* https://bugs.launchpad.net/kicad/+bug/1674595
This commit is contained in:
John Beard 2017-03-22 00:21:41 +08:00 committed by Maciej Suminski
parent 0f7e898caa
commit ea10a67d14
1 changed files with 20 additions and 1 deletions

View File

@ -45,6 +45,7 @@
#include <protos.h>
#include <zones_functions_for_undo_redo.h>
#include <drc_stuff.h>
#include <ratsnest_data.h>
// Outline creation:
static void Abort_Zone_Create_Outline( EDA_DRAW_PANEL* Panel, wxDC* DC );
@ -934,8 +935,26 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* aZone )
// Redraw the real new zone outlines
GetBoard()->RedrawAreasOutlines( m_canvas, DC, GR_OR, UNDEFINED_LAYER );
UpdateCopyOfZonesList( s_PickedList, s_AuxiliaryList, GetBoard() );
// refill zones with the new properties applied
for( unsigned i = 0; i < s_PickedList.GetCount(); ++i )
{
auto zone = dyn_cast<ZONE_CONTAINER*>( s_PickedList.GetPickedItem( i ) );
if( zone == nullptr )
{
wxASSERT_MSG( false, "Expected a zone after zone properties edit" );
continue;
}
if( zone->IsFilled() )
{
Fill_Zone( zone );
GetBoard()->GetRatsnest()->Recalculate( zone->GetNetCode() );
}
}
commit.Stage( s_PickedList );
commit.Push( _( "Modify zone properties" ) );