Code formatting

This commit is contained in:
Maciej Suminski 2017-09-20 10:30:48 +02:00
parent d87c9f7ed7
commit 88cab885af
7 changed files with 12 additions and 7 deletions

View File

@ -139,11 +139,13 @@ void GERBVIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
// On macOS, the call to create overlaydc fails for some reason due to
// the DC having zero size initially.
wxCoord w = 0, h = 0;
( (wxWindowDC*)DC )->GetSize( &w, &h );
static_cast<wxWindowDC*>( DC )->GetSize( &w, &h );
if( w == 0 || h == 0)
{
w = h = 1;
}
wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)DC, 0, 0, 1, 1 );
overlaydc.Clear();
}

View File

@ -302,7 +302,6 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
}
// Handles the changing of the highlighted component/net/attribute
void GERBVIEW_FRAME::OnSelectHighlightChoice( wxCommandEvent& event )
{
if( IsGalCanvasActive() )

View File

@ -199,9 +199,11 @@ bool GERBVIEW_FRAME::Read_EXCELLON_File( const wxString& aFullFileName )
if( success )
{
EDA_DRAW_PANEL_GAL* canvas = GetGalCanvas();
if( canvas )
{
KIGFX::VIEW* view = canvas->GetView();
for( GERBER_DRAW_ITEM* item = drill_Layer->GetItemsList(); item; item = item->Next() )
{
view->Add( (KIGFX::VIEW_ITEM*) item );

View File

@ -128,7 +128,7 @@ void GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps()
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_AXES );
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_BACKGROUND );
m_view->SetLayerTarget( LAYER_GP_OVERLAY , KIGFX::TARGET_OVERLAY );
m_view->SetLayerTarget( LAYER_GP_OVERLAY, KIGFX::TARGET_OVERLAY );
m_view->SetLayerDisplayOnly( LAYER_GP_OVERLAY );
}

View File

@ -217,6 +217,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
{
if( GetGalCanvas()->SwitchBackend( canvasType ) )
UseGalCanvas( true );
wxUpdateUIEvent e;
OnUpdateSwitchCanvas( e );
}

View File

@ -496,6 +496,8 @@ public:
void Process_Special_Functions( wxCommandEvent& event );
void OnSelectOptionToolbar( wxCommandEvent& event );
/// Handles the changing of the highlighted component/net/attribute
void OnSelectHighlightChoice( wxCommandEvent& event );
/**

View File

@ -178,7 +178,7 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
bool isFilled = true;
COLOR4D color;
// TODO(JE) This doesn't actually work properly for ImageNegative
bool isNegative = (aItem->GetLayerPolarity() ^ aItem->m_GerberImageFile->m_ImageNegative);
bool isNegative = ( aItem->GetLayerPolarity() ^ aItem->m_GerberImageFile->m_ImageNegative );
// Draw DCODEs if enabled
if( IsDCodeLayer( aLayer ) )
@ -206,9 +206,8 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
}
else
{
textPosition.x = (start.x + end.x) / 2;
textPosition.y = (start.y + end.y) / 2;
textPosition.x = ( start.x + end.x ) / 2;
textPosition.y = ( start.y + end.y ) / 2;
}
color = m_gerbviewSettings.GetColor( aItem, aLayer );