Code formatting
This commit is contained in:
parent
d87c9f7ed7
commit
88cab885af
|
@ -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
|
// On macOS, the call to create overlaydc fails for some reason due to
|
||||||
// the DC having zero size initially.
|
// the DC having zero size initially.
|
||||||
wxCoord w = 0, h = 0;
|
wxCoord w = 0, h = 0;
|
||||||
( (wxWindowDC*)DC )->GetSize( &w, &h );
|
static_cast<wxWindowDC*>( DC )->GetSize( &w, &h );
|
||||||
|
|
||||||
if( w == 0 || h == 0)
|
if( w == 0 || h == 0)
|
||||||
{
|
{
|
||||||
w = h = 1;
|
w = h = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)DC, 0, 0, 1, 1 );
|
wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)DC, 0, 0, 1, 1 );
|
||||||
overlaydc.Clear();
|
overlaydc.Clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 )
|
void GERBVIEW_FRAME::OnSelectHighlightChoice( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( IsGalCanvasActive() )
|
if( IsGalCanvasActive() )
|
||||||
|
|
|
@ -199,9 +199,11 @@ bool GERBVIEW_FRAME::Read_EXCELLON_File( const wxString& aFullFileName )
|
||||||
if( success )
|
if( success )
|
||||||
{
|
{
|
||||||
EDA_DRAW_PANEL_GAL* canvas = GetGalCanvas();
|
EDA_DRAW_PANEL_GAL* canvas = GetGalCanvas();
|
||||||
|
|
||||||
if( canvas )
|
if( canvas )
|
||||||
{
|
{
|
||||||
KIGFX::VIEW* view = canvas->GetView();
|
KIGFX::VIEW* view = canvas->GetView();
|
||||||
|
|
||||||
for( GERBER_DRAW_ITEM* item = drill_Layer->GetItemsList(); item; item = item->Next() )
|
for( GERBER_DRAW_ITEM* item = drill_Layer->GetItemsList(); item; item = item->Next() )
|
||||||
{
|
{
|
||||||
view->Add( (KIGFX::VIEW_ITEM*) item );
|
view->Add( (KIGFX::VIEW_ITEM*) item );
|
||||||
|
|
|
@ -128,7 +128,7 @@ void GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps()
|
||||||
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_AXES );
|
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_AXES );
|
||||||
m_view->SetLayerDisplayOnly( LAYER_GERBVIEW_BACKGROUND );
|
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 );
|
m_view->SetLayerDisplayOnly( LAYER_GP_OVERLAY );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -217,6 +217,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||||
{
|
{
|
||||||
if( GetGalCanvas()->SwitchBackend( canvasType ) )
|
if( GetGalCanvas()->SwitchBackend( canvasType ) )
|
||||||
UseGalCanvas( true );
|
UseGalCanvas( true );
|
||||||
|
|
||||||
wxUpdateUIEvent e;
|
wxUpdateUIEvent e;
|
||||||
OnUpdateSwitchCanvas( e );
|
OnUpdateSwitchCanvas( e );
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,6 +496,8 @@ public:
|
||||||
|
|
||||||
void Process_Special_Functions( wxCommandEvent& event );
|
void Process_Special_Functions( wxCommandEvent& event );
|
||||||
void OnSelectOptionToolbar( wxCommandEvent& event );
|
void OnSelectOptionToolbar( wxCommandEvent& event );
|
||||||
|
|
||||||
|
/// Handles the changing of the highlighted component/net/attribute
|
||||||
void OnSelectHighlightChoice( wxCommandEvent& event );
|
void OnSelectHighlightChoice( wxCommandEvent& event );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -178,7 +178,7 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
|
||||||
bool isFilled = true;
|
bool isFilled = true;
|
||||||
COLOR4D color;
|
COLOR4D color;
|
||||||
// TODO(JE) This doesn't actually work properly for ImageNegative
|
// 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
|
// Draw DCODEs if enabled
|
||||||
if( IsDCodeLayer( aLayer ) )
|
if( IsDCodeLayer( aLayer ) )
|
||||||
|
@ -206,9 +206,8 @@ void GERBVIEW_PAINTER::draw( /*const*/ GERBER_DRAW_ITEM* aItem, int aLayer )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
textPosition.x = ( start.x + end.x ) / 2;
|
||||||
textPosition.x = (start.x + end.x) / 2;
|
textPosition.y = ( start.y + end.y ) / 2;
|
||||||
textPosition.y = (start.y + end.y) / 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
color = m_gerbviewSettings.GetColor( aItem, aLayer );
|
color = m_gerbviewSettings.GetColor( aItem, aLayer );
|
||||||
|
|
Loading…
Reference in New Issue