Revert "Separate copper and graphical zone tools"

This reverts commit fea71c9f8f.
This commit is contained in:
Wayne Stambaugh 2018-02-24 08:31:25 -05:00
parent 948396024b
commit 3a73e775de
1 changed files with 9 additions and 5 deletions

View File

@ -61,12 +61,9 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
// Get the current default settings for zones // Get the current default settings for zones
ZONE_SETTINGS zoneInfo = frame.GetZoneSettings(); ZONE_SETTINGS zoneInfo = frame.GetZoneSettings();
zoneInfo.m_CurrentZone_Layer = frame.GetScreen()->m_Active_Layer;
zoneInfo.m_NetcodeSelection = board.GetHighLightNetCode(); zoneInfo.m_NetcodeSelection = board.GetHighLightNetCode();
zoneInfo.SetIsKeepout( m_params.m_keepout ); zoneInfo.SetIsKeepout( m_params.m_keepout );
zoneInfo.m_CurrentZone_Layer = frame.GetScreen()->m_Active_Layer;
if( !IsCopperLayer( zoneInfo.m_CurrentZone_Layer ) )
zoneInfo.m_CurrentZone_Layer = F_Cu;
if ( m_params.m_mode != DRAWING_TOOL::ZONE_MODE::GRAPHIC_POLYGON ) if ( m_params.m_mode != DRAWING_TOOL::ZONE_MODE::GRAPHIC_POLYGON )
{ {
@ -78,10 +75,17 @@ std::unique_ptr<ZONE_CONTAINER> ZONE_CREATE_HELPER::createNewZone( bool aKeepout
if( m_params.m_keepout ) if( m_params.m_keepout )
dialogResult = InvokeKeepoutAreaEditor( &frame, &zoneInfo ); dialogResult = InvokeKeepoutAreaEditor( &frame, &zoneInfo );
else else
dialogResult = InvokeCopperZonesEditor( &frame, &zoneInfo ); {
if( IsCopperLayer( zoneInfo.m_CurrentZone_Layer ) )
dialogResult = InvokeCopperZonesEditor( &frame, &zoneInfo );
else
dialogResult = InvokeNonCopperZonesEditor( &frame, nullptr, &zoneInfo );
}
if( dialogResult == ZONE_ABORT ) if( dialogResult == ZONE_ABORT )
{
return nullptr; return nullptr;
}
} }
auto newZone = std::make_unique<ZONE_CONTAINER>( &board ); auto newZone = std::make_unique<ZONE_CONTAINER>( &board );