MaskLay was type bool, needs to be type int
This commit is contained in:
parent
2b6ec786a8
commit
0f406d3f89
|
@ -3,8 +3,9 @@
|
|||
/*****************************************/
|
||||
|
||||
/* fichier tracepcb.cpp */
|
||||
|
||||
/*
|
||||
Routines d'affichage grille, Boite de coordonnees, Curseurs, marqueurs ...
|
||||
* Routines d'affichage grille, Boite de coordonnees, Curseurs, marqueurs ...
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
|
@ -27,19 +28,21 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow(wxDC * DC, bool EraseBg)
|
|||
/**********************************************************************/
|
||||
|
||||
/* Trace le PCB, et les elements complementaires ( axes, grille .. )
|
||||
pour l'ecran actif et ses sous ecran
|
||||
* pour l'ecran actif et ses sous ecran
|
||||
*/
|
||||
|
||||
{
|
||||
MODULE* Module;
|
||||
PCB_SCREEN* screen = GetScreen();
|
||||
|
||||
if ( ! m_Pcb || ! screen ) return;
|
||||
if( !m_Pcb || !screen )
|
||||
return;
|
||||
|
||||
ActiveScreen = screen;
|
||||
GRSetDrawMode( DC, GR_COPY );
|
||||
|
||||
if ( EraseBg ) DrawPanel->EraseScreen(DC);
|
||||
if( EraseBg )
|
||||
DrawPanel->EraseScreen( DC );
|
||||
|
||||
DrawPanel->DrawBackGround( DC );
|
||||
TraceWorkSheet( DC, screen, 0 );
|
||||
|
@ -50,7 +53,6 @@ PCB_SCREEN * screen = GetScreen();
|
|||
Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_OR );
|
||||
}
|
||||
|
||||
|
||||
Affiche_Status_Box();
|
||||
|
||||
if( DrawPanel->ManageCurseur )
|
||||
|
@ -62,21 +64,25 @@ PCB_SCREEN * screen = GetScreen();
|
|||
screen->ClrRefreshReq();
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************/
|
||||
void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
||||
/****************************************************************/
|
||||
|
||||
/* Trace le PCB, et les elements complementaires ( axes, grille .. )
|
||||
pour l'ecran actif et ses sous ecran
|
||||
* pour l'ecran actif et ses sous ecran
|
||||
*/
|
||||
{
|
||||
PCB_SCREEN* Screen = GetScreen();
|
||||
|
||||
if ( ! m_Pcb || ! Screen ) return;
|
||||
if( !m_Pcb || !Screen )
|
||||
return;
|
||||
|
||||
ActiveScreen = GetScreen();
|
||||
GRSetDrawMode( DC, GR_COPY );
|
||||
|
||||
if ( EraseBg ) DrawPanel->EraseScreen(DC);
|
||||
if( EraseBg )
|
||||
DrawPanel->EraseScreen( DC );
|
||||
|
||||
DrawPanel->DrawBackGround( DC );
|
||||
|
||||
|
@ -93,6 +99,7 @@ PCB_SCREEN * Screen = GetScreen();
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/****************************************************/
|
||||
void WinEDA_PcbFrame::Trace_Pcb( wxDC* DC, int mode )
|
||||
/****************************************************/
|
||||
|
@ -102,27 +109,35 @@ MARQUEUR * Marqueur;
|
|||
MODULE* Module;
|
||||
EDA_BaseStruct* PtStruct;
|
||||
|
||||
if ( ! m_Pcb ) return;
|
||||
if( !m_Pcb )
|
||||
return;
|
||||
|
||||
Module = (MODULE*) m_Pcb->m_Modules;
|
||||
for( ; Module != NULL; Module = (MODULE*) Module->Pnext )
|
||||
{
|
||||
bool display = TRUE, MaskLay = ALL_CU_LAYERS;
|
||||
if( Module->m_Flags & IS_MOVED ) continue ;
|
||||
bool display = true;
|
||||
int MaskLay = ALL_CU_LAYERS;
|
||||
|
||||
if( Module->m_Flags & IS_MOVED )
|
||||
continue;
|
||||
|
||||
if( !DisplayOpt.Show_Modules_Cmp )
|
||||
{
|
||||
if(Module->m_Layer == CMP_N) display = FALSE;
|
||||
if( Module->m_Layer == CMP_N )
|
||||
display = FALSE;
|
||||
MaskLay &= ~CMP_LAYER;
|
||||
}
|
||||
if( !DisplayOpt.Show_Modules_Cu )
|
||||
{
|
||||
if(Module->m_Layer == CUIVRE_N) display = FALSE;
|
||||
if( Module->m_Layer == CUIVRE_N )
|
||||
display = FALSE;
|
||||
MaskLay &= ~CUIVRE_LAYER;
|
||||
}
|
||||
|
||||
if ( display ) Module->Draw(DrawPanel, DC, wxPoint(0,0), mode);
|
||||
else Trace_Pads_Only(DrawPanel, DC, Module, 0, 0, MaskLay, mode);
|
||||
if( display )
|
||||
Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), mode );
|
||||
else
|
||||
Trace_Pads_Only( DrawPanel, DC, Module, 0, 0, MaskLay, mode );
|
||||
}
|
||||
|
||||
/* Trace des elements particuliers de Drawings Pcb */
|
||||
|
@ -130,7 +145,8 @@ EDA_BaseStruct * PtStruct;
|
|||
PtStruct = m_Pcb->m_Drawings;
|
||||
for( ; PtStruct != NULL; PtStruct = PtStruct->Pnext )
|
||||
{
|
||||
if ( PtStruct->m_Flags & IS_MOVED ) continue;
|
||||
if( PtStruct->m_Flags & IS_MOVED )
|
||||
continue;
|
||||
|
||||
switch( PtStruct->m_StructType )
|
||||
{
|
||||
|
@ -151,17 +167,20 @@ EDA_BaseStruct * PtStruct;
|
|||
Marqueur->Draw( DrawPanel, DC, mode );
|
||||
break;
|
||||
|
||||
default: break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Trace_Pistes( DrawPanel, m_Pcb, DC, mode );
|
||||
if ( g_HightLigt_Status ) DrawHightLight(DC, g_HightLigth_NetCode) ;
|
||||
if( g_HightLigt_Status )
|
||||
DrawHightLight( DC, g_HightLigth_NetCode );
|
||||
|
||||
EDGE_ZONE* segment = m_Pcb->m_CurrentLimitZone;
|
||||
for( ; segment != NULL; segment = (EDGE_ZONE*) segment->Pback )
|
||||
{
|
||||
if ( segment->m_Flags & IS_MOVED ) continue;
|
||||
if( segment->m_Flags & IS_MOVED )
|
||||
continue;
|
||||
Trace_DrawSegmentPcb( DrawPanel, DC, segment, mode );
|
||||
}
|
||||
|
||||
|
@ -179,14 +198,14 @@ void WinEDA_PcbFrame::Trace_PcbEdges(wxDC * DC, int mode_color)
|
|||
{
|
||||
EDA_BaseStruct* PtStruct;
|
||||
|
||||
if ( ! m_Pcb ) return;
|
||||
if( !m_Pcb )
|
||||
return;
|
||||
for( PtStruct = m_Pcb->m_Drawings; PtStruct != NULL; PtStruct = PtStruct->Pnext )
|
||||
{
|
||||
if ( PtStruct->m_Flags & IS_MOVED ) continue;
|
||||
if( PtStruct->m_StructType != TYPEDRAWSEGMENT ) continue;
|
||||
if( PtStruct->m_Flags & IS_MOVED )
|
||||
continue;
|
||||
if( PtStruct->m_StructType != TYPEDRAWSEGMENT )
|
||||
continue;
|
||||
Trace_DrawSegmentPcb( DrawPanel, DC, (DRAWSEGMENT*) PtStruct, mode_color );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue