Code formatting

This commit is contained in:
Maciej Suminski 2017-02-10 23:20:18 +01:00
parent 728349ea12
commit 95794df088
3 changed files with 14 additions and 18 deletions

View File

@ -254,7 +254,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
}
}
else if ( evt->IsClick( BUT_RIGHT ) )
else if( evt->IsClick( BUT_RIGHT ) )
{
m_menu.ShowContextMenu();
}
@ -429,7 +429,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
}
}
else if ( evt->IsClick( BUT_RIGHT ) )
else if( evt->IsClick( BUT_RIGHT ) )
{
m_menu.ShowContextMenu();
}
@ -659,7 +659,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT& aEvent )
}
}
else if ( evt->IsClick( BUT_RIGHT ) )
else if( evt->IsClick( BUT_RIGHT ) )
{
m_menu.ShowContextMenu();
}
@ -796,7 +796,7 @@ int DRAWING_TOOL::SetAnchor( const TOOL_EVENT& aEvent )
// so deselect the active tool
break;
}
else if ( evt->IsClick( BUT_RIGHT ) )
else if( evt->IsClick( BUT_RIGHT ) )
{
m_menu.ShowContextMenu();
}
@ -1218,8 +1218,7 @@ std::unique_ptr<ZONE_CONTAINER> DRAWING_TOOL::createZoneFromExisting(
}
bool DRAWING_TOOL::getSourceZoneForAction( ZONE_MODE aMode,
ZONE_CONTAINER*& aZone )
bool DRAWING_TOOL::getSourceZoneForAction( ZONE_MODE aMode, ZONE_CONTAINER*& aZone )
{
aZone = nullptr;
@ -1247,13 +1246,12 @@ bool DRAWING_TOOL::getSourceZoneForAction( ZONE_MODE aMode,
}
void DRAWING_TOOL::performZoneCutout( ZONE_CONTAINER& aExistingZone,
ZONE_CONTAINER& cutout )
void DRAWING_TOOL::performZoneCutout( ZONE_CONTAINER& aExistingZone, ZONE_CONTAINER& aCutout )
{
// Copy cutout corners into existing zone
for( int ii = 0; ii < cutout.GetNumCorners(); ii++ )
for( int ii = 0; ii < aCutout.GetNumCorners(); ii++ )
{
aExistingZone.AppendCorner( cutout.GetCornerPosition( ii ) );
aExistingZone.AppendCorner( aCutout.GetCornerPosition( ii ) );
}
// Close the current corner list
@ -1374,7 +1372,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout, ZONE_MODE aMode )
if( !aKeepout )
static_cast<PCB_EDIT_FRAME*>( m_frame )->Fill_Zone( zone.get() );
if ( aMode == ZONE_MODE::CUTOUT )
if( aMode == ZONE_MODE::CUTOUT )
{
// For cutouts, subtract from the source
commit.Modify( sourceZone );

View File

@ -234,8 +234,7 @@ private:
* @param aSrcZone the zone to copy settings from
* @return the new zone
*/
std::unique_ptr<ZONE_CONTAINER> createZoneFromExisting(
const ZONE_CONTAINER& aSrcZone );
std::unique_ptr<ZONE_CONTAINER> createZoneFromExisting( const ZONE_CONTAINER& aSrcZone );
/**
* Function getSourceZoneForAction()
@ -261,8 +260,7 @@ private:
* @param aExistingZone the zone to removed area from
* @param aCutout the area to remove
*/
void performZoneCutout( ZONE_CONTAINER& aExistingZone,
ZONE_CONTAINER& cutout );
void performZoneCutout( ZONE_CONTAINER& aExistingZone, ZONE_CONTAINER& aCutout );
/**
* Function make45DegLine()

View File

@ -94,9 +94,9 @@ private:
&& SELECTION_CONDITIONS::OnlyType( PCB_ZONE_AREA_T )
)( selTool->GetSelection() );
Enable( getMenuId( COMMON_ACTIONS::zoneDuplicate), singleZoneActionsEnabled );
Enable( getMenuId( COMMON_ACTIONS::drawZoneCutout), singleZoneActionsEnabled );
Enable( getMenuId( COMMON_ACTIONS::drawSimilarZone), singleZoneActionsEnabled );
Enable( getMenuId( COMMON_ACTIONS::zoneDuplicate ), singleZoneActionsEnabled );
Enable( getMenuId( COMMON_ACTIONS::drawZoneCutout ), singleZoneActionsEnabled );
Enable( getMenuId( COMMON_ACTIONS::drawSimilarZone ), singleZoneActionsEnabled );
// enable zone actions that ably to a specific set of zones (as opposed to all of them)
bool nonGlobalActionsEnabled = ( SELECTION_CONDITIONS::MoreThan( 0 ) )( selTool->GetSelection() );