LSET::UIOrder and LSET::Technicals now match layer widget order
Fixes: lp:1673792 * https://bugs.launchpad.net/kicad/+bug/1673792
This commit is contained in:
parent
63e55e9180
commit
6eb5733a0b
|
@ -190,18 +190,18 @@ LSEQ LSET::Technicals( LSET aSetToOmit ) const
|
|||
{
|
||||
// desired sequence
|
||||
static const PCB_LAYER_ID sequence[] = {
|
||||
B_Adhes,
|
||||
F_Adhes,
|
||||
B_Paste,
|
||||
B_Adhes,
|
||||
F_Paste,
|
||||
B_SilkS,
|
||||
B_Paste,
|
||||
F_SilkS,
|
||||
B_Mask,
|
||||
B_SilkS,
|
||||
F_Mask,
|
||||
B_CrtYd,
|
||||
B_Mask,
|
||||
F_CrtYd,
|
||||
B_Fab,
|
||||
B_CrtYd,
|
||||
F_Fab,
|
||||
B_Fab,
|
||||
};
|
||||
|
||||
LSET subset = ~aSetToOmit & *this;
|
||||
|
@ -226,6 +226,33 @@ LSEQ LSET::Users() const
|
|||
}
|
||||
|
||||
|
||||
LSEQ LSET::TechAndUserUIOrder() const
|
||||
{
|
||||
static const PCB_LAYER_ID sequence[] = {
|
||||
F_Adhes,
|
||||
B_Adhes,
|
||||
F_Paste,
|
||||
B_Paste,
|
||||
F_SilkS,
|
||||
B_SilkS,
|
||||
F_Mask,
|
||||
B_Mask,
|
||||
Dwgs_User,
|
||||
Cmts_User,
|
||||
Eco1_User,
|
||||
Eco2_User,
|
||||
Edge_Cuts,
|
||||
Margin,
|
||||
F_CrtYd,
|
||||
B_CrtYd,
|
||||
F_Fab,
|
||||
B_Fab,
|
||||
};
|
||||
|
||||
return Seq( sequence, DIM( sequence ) );
|
||||
}
|
||||
|
||||
|
||||
std::string LSET::FmtBin() const
|
||||
{
|
||||
std::string ret;
|
||||
|
@ -758,16 +785,11 @@ LSET LSET::BackMask()
|
|||
|
||||
LSEQ LSET::UIOrder() const
|
||||
{
|
||||
PCB_LAYER_ID order[PCB_LAYER_ID_COUNT];
|
||||
LSEQ order = CuStack();
|
||||
LSEQ techuser = TechAndUserUIOrder();
|
||||
order.insert( order.end(), techuser.begin(), techuser.end() );
|
||||
|
||||
// Assmuming that the PCB_LAYER_ID order is according to preferred UI order, as of
|
||||
// today this is true. When that becomes not true, its easy to change the order
|
||||
// in here to compensate.
|
||||
|
||||
for( unsigned i=0; i<DIM(order); ++i )
|
||||
order[i] = PCB_LAYER_ID( i );
|
||||
|
||||
return Seq( order, DIM( order ) );
|
||||
return order;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -546,6 +546,9 @@ public:
|
|||
/// *_User layers.
|
||||
LSEQ Users() const;
|
||||
|
||||
/// Returns the technical and user layers in the order shown in layer widget
|
||||
LSEQ TechAndUserUIOrder() const;
|
||||
|
||||
LSEQ UIOrder() const;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue