reorder GENERAL_COLLECTOR lists in collectors.cpp due to markers change

This commit is contained in:
CHARRAS 2008-01-08 17:44:20 +00:00
parent 82a268a63e
commit 8d90da0a2d
3 changed files with 136 additions and 115 deletions

View File

@ -215,7 +215,6 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
int dX = refPos.x - m_Pos.x;
int dY = refPos.y - m_Pos.y;
int rayon = m_Size / 2;
return abs(dX)<=rayon && abs(dY)<=rayon;
}

View File

@ -27,49 +27,48 @@
/* This module contains out of line member functions for classes given in
collectors.h. Those classes augment the functionality of class WinEDA_PcbFrame.
* collectors.h. Those classes augment the functionality of class WinEDA_PcbFrame.
*/
// see collectors.h
const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
// there are some restrictions on the order of items in the general case.
// all items in m_Drawings for instance should be contiguous.
TYPETEXTE,
TYPEDRAWSEGMENT,
TYPEMARKER,
TYPECOTATION,
TYPEMIRE,
TYPEVIA,
TYPETRACK,
TYPEPAD,
TYPETEXTEMODULE,
TYPEMODULE,
TYPEZONE,
TYPEZONE_CONTAINER,
// *** all items in a same list (shown here) must be contigous ****
TYPEMARKER, // in m_markers
TYPETEXTE, // in m_Drawings
TYPEDRAWSEGMENT, // in m_Drawings
TYPECOTATION, // in m_Drawings
TYPEMIRE, // in m_Drawings
TYPEVIA, // in m_Tracks
TYPETRACK, // in m_Tracks
TYPEPAD, // in modules
TYPETEXTEMODULE, // in modules
TYPEMODULE, // in m_Modules
TYPEZONE, // in m_Zones
TYPEZONE_CONTAINER, // in m_ZoneDescriptorList
EOT
};
/*
const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = {
TYPETEXTE,
TYPEDRAWSEGMENT,
TYPEMARKER,
TYPECOTATION,
TYPEVIA,
TYPETRACK,
TYPEMODULE,
EOT
};
* const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = {
* TYPETEXTE,
* TYPEDRAWSEGMENT,
* TYPECOTATION,
* TYPEVIA,
* TYPETRACK,
* TYPEMODULE,
* EOT
* };
*/
const KICAD_T GENERAL_COLLECTOR::AllButZones[] = {
TYPEMARKER,
TYPETEXTE,
TYPEDRAWSEGMENT,
TYPEMARKER,
TYPECOTATION,
TYPEMIRE,
TYPEVIA,
@ -138,6 +137,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
#if 0 // debugging
static int breakhere = 0;
switch( item->Type() )
{
case TYPEPAD:
@ -149,24 +149,31 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
}
}
break;
case TYPEVIA:
breakhere++;
break;
case TYPETRACK:
breakhere++;
break;
case TYPEZONE:
breakhere++;
break;
case TYPETEXTE:
breakhere++;
break;
case TYPEDRAWSEGMENT:
breakhere++;
break;
case TYPECOTATION:
breakhere++;
break;
case TYPETEXTEMODULE:
{
TEXTE_MODULE* tm = (TEXTE_MODULE*) item;
@ -176,6 +183,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
}
}
break;
case TYPEMODULE:
{
MODULE* m = (MODULE*) item;
@ -190,12 +198,14 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
breakhere++;
break;
}
#endif
switch( item->Type() )
{
case TYPEPAD:
// if pad is a thru hole, then it can be visible when its parent module is not.
if( ( (D_PAD*) item )->m_Attribut != PAD_SMD ) // a hole is present, so multiple layers
{
@ -209,19 +219,28 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
case TYPEVIA:
break;
case TYPETRACK:
break;
case TYPEZONE:
break;
case TYPEZONE_CONTAINER:
break;
case TYPETEXTE:
break;
case TYPEDRAWSEGMENT:
break;
case TYPECOTATION:
break;
case TYPEMIRE:
break;
case TYPETEXTEMODULE:
module = (MODULE*) item->GetParent();

View File

@ -459,12 +459,15 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
if( diag == ZONE_ABORT )
return NULL;
GetScreen()->m_Active_Layer = s_Zone_Layer; // Set by the dialog frame
}
else /* Start a new contour: init zone params (net and layer) from an existing zone */
{
GetScreen()->m_Active_Layer = s_Zone_Layer = s_CurrentZone->GetLayer();
s_Zone_Hatching = s_CurrentZone->m_Poly->GetHatchStyle();
}
/* Show the Net */
if( g_HightLigt_Status && (g_HightLigth_NetCode != s_NetcodeSelection) )
{