Fix ZONE_CONTAINER ctor issue: incorrect net info setting.
In ZONE_CONTAINER( ZONE_CONTAINER& aOther ), the net info was set before zone type and layer were set. So the net info was always set to ORPHAN net, instead of set to aOther net info. Especially, it broke undo/redo function. Fixes: lp:1840727 https://bugs.launchpad.net/kicad/+bug/1840727
This commit is contained in:
parent
23e09d3de7
commit
26ebf3c961
|
@ -76,8 +76,6 @@ ZONE_CONTAINER::ZONE_CONTAINER( BOARD* aBoard ) :
|
||||||
ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
|
ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
|
||||||
BOARD_CONNECTED_ITEM( aZone )
|
BOARD_CONNECTED_ITEM( aZone )
|
||||||
{
|
{
|
||||||
// Should the copy be on the same net?
|
|
||||||
SetNetCode( aZone.GetNetCode() );
|
|
||||||
m_Poly = new SHAPE_POLY_SET( *aZone.m_Poly );
|
m_Poly = new SHAPE_POLY_SET( *aZone.m_Poly );
|
||||||
|
|
||||||
// For corner moving, corner index to drag, or nullptr if no selection
|
// For corner moving, corner index to drag, or nullptr if no selection
|
||||||
|
@ -116,6 +114,10 @@ ZONE_CONTAINER::ZONE_CONTAINER( const ZONE_CONTAINER& aZone ) :
|
||||||
SetLayerSet( aZone.GetLayerSet() );
|
SetLayerSet( aZone.GetLayerSet() );
|
||||||
SetLocalFlags( aZone.GetLocalFlags() );
|
SetLocalFlags( aZone.GetLocalFlags() );
|
||||||
|
|
||||||
|
// Now zone type and layer are set, transfer net info
|
||||||
|
// (has meaning only for copper zones)
|
||||||
|
SetNetCode( aZone.GetNetCode() );
|
||||||
|
|
||||||
SetNeedRefill( aZone.NeedRefill() );
|
SetNeedRefill( aZone.NeedRefill() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue