Clean up removal of separate front & back footprint text visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/9441
This commit is contained in:
parent
00d87e9a1d
commit
fecb53b64f
|
@ -144,8 +144,7 @@ wxString LayerName( int aLayer )
|
||||||
case LAYER_MOD_BK: return _( "Footprints back" );
|
case LAYER_MOD_BK: return _( "Footprints back" );
|
||||||
case LAYER_MOD_VALUES: return _( "Values" );
|
case LAYER_MOD_VALUES: return _( "Values" );
|
||||||
case LAYER_MOD_REFERENCES: return _( "Reference designators" );
|
case LAYER_MOD_REFERENCES: return _( "Reference designators" );
|
||||||
case LAYER_MOD_TEXT_FR: return _( "Footprint text front" );
|
case LAYER_MOD_TEXT: return _( "Footprint text" );
|
||||||
case LAYER_MOD_TEXT_BK: return _( "Footprint text back" );
|
|
||||||
case LAYER_MOD_TEXT_INVISIBLE: return _( "Hidden text" );
|
case LAYER_MOD_TEXT_INVISIBLE: return _( "Hidden text" );
|
||||||
case LAYER_PAD_FR: return _( "SMD pads front" );
|
case LAYER_PAD_FR: return _( "SMD pads front" );
|
||||||
case LAYER_PAD_BK: return _( "SMD pads back" );
|
case LAYER_PAD_BK: return _( "SMD pads back" );
|
||||||
|
|
|
@ -938,8 +938,7 @@ GAL_SET GAL_SET::DefaultVisible()
|
||||||
LAYER_VIA_BBLIND,
|
LAYER_VIA_BBLIND,
|
||||||
LAYER_VIA_THROUGH,
|
LAYER_VIA_THROUGH,
|
||||||
LAYER_NON_PLATEDHOLES,
|
LAYER_NON_PLATEDHOLES,
|
||||||
LAYER_MOD_TEXT_FR,
|
LAYER_MOD_TEXT,
|
||||||
LAYER_MOD_TEXT_BK,
|
|
||||||
// LAYER_MOD_TEXT_INVISIBLE, // Invisible text hidden by default
|
// LAYER_MOD_TEXT_INVISIBLE, // Invisible text hidden by default
|
||||||
LAYER_ANCHOR,
|
LAYER_ANCHOR,
|
||||||
LAYER_PAD_FR,
|
LAYER_PAD_FR,
|
||||||
|
|
|
@ -191,8 +191,8 @@ enum GAL_LAYER_ID: int
|
||||||
LAYER_VIA_BBLIND = GAL_LAYER_ID_START + 2, ///< to draw blind/buried vias
|
LAYER_VIA_BBLIND = GAL_LAYER_ID_START + 2, ///< to draw blind/buried vias
|
||||||
LAYER_VIA_THROUGH = GAL_LAYER_ID_START + 3, ///< to draw usual through hole vias
|
LAYER_VIA_THROUGH = GAL_LAYER_ID_START + 3, ///< to draw usual through hole vias
|
||||||
LAYER_NON_PLATEDHOLES = GAL_LAYER_ID_START + 4, ///< handle color for not plated holes (holes, not pads)
|
LAYER_NON_PLATEDHOLES = GAL_LAYER_ID_START + 4, ///< handle color for not plated holes (holes, not pads)
|
||||||
LAYER_MOD_TEXT_FR = GAL_LAYER_ID_START + 5,
|
LAYER_MOD_TEXT = GAL_LAYER_ID_START + 5,
|
||||||
LAYER_MOD_TEXT_BK = GAL_LAYER_ID_START + 6,
|
// LAYER_MOD_TEXT_BK deprecated + 6,
|
||||||
LAYER_MOD_TEXT_INVISIBLE = GAL_LAYER_ID_START + 7, ///< text marked as invisible
|
LAYER_MOD_TEXT_INVISIBLE = GAL_LAYER_ID_START + 7, ///< text marked as invisible
|
||||||
LAYER_ANCHOR = GAL_LAYER_ID_START + 8, ///< anchor of items having an anchor point (texts, footprints)
|
LAYER_ANCHOR = GAL_LAYER_ID_START + 8, ///< anchor of items having an anchor point (texts, footprints)
|
||||||
LAYER_PAD_FR = GAL_LAYER_ID_START + 9, ///< smd pads, front layer
|
LAYER_PAD_FR = GAL_LAYER_ID_START + 9, ///< smd pads, front layer
|
||||||
|
|
|
@ -361,8 +361,7 @@ std::set<int> g_excludedLayers =
|
||||||
LAYER_MOD_VALUES,
|
LAYER_MOD_VALUES,
|
||||||
LAYER_MOD_REFERENCES,
|
LAYER_MOD_REFERENCES,
|
||||||
LAYER_TRACKS,
|
LAYER_TRACKS,
|
||||||
LAYER_MOD_TEXT_FR,
|
LAYER_MOD_TEXT,
|
||||||
LAYER_MOD_TEXT_BK,
|
|
||||||
LAYER_PAD_PLATEDHOLES,
|
LAYER_PAD_PLATEDHOLES,
|
||||||
LAYER_PAD_HOLEWALLS,
|
LAYER_PAD_HOLEWALLS,
|
||||||
LAYER_GP_OVERLAY,
|
LAYER_GP_OVERLAY,
|
||||||
|
|
|
@ -786,11 +786,11 @@ const EDA_RECT FOOTPRINT::GetBoundingBox( bool aIncludeText, bool aIncludeInvisi
|
||||||
// 3rd "&&" conditionals handle that.
|
// 3rd "&&" conditionals handle that.
|
||||||
valueLayerIsVisible = board->IsLayerVisible( m_value->GetLayer() )
|
valueLayerIsVisible = board->IsLayerVisible( m_value->GetLayer() )
|
||||||
&& board->IsElementVisible( LAYER_MOD_VALUES )
|
&& board->IsElementVisible( LAYER_MOD_VALUES )
|
||||||
&& board->IsElementVisible( LAYER_MOD_TEXT_FR );
|
&& board->IsElementVisible( LAYER_MOD_TEXT );
|
||||||
|
|
||||||
refLayerIsVisible = board->IsLayerVisible( m_reference->GetLayer() )
|
refLayerIsVisible = board->IsLayerVisible( m_reference->GetLayer() )
|
||||||
&& board->IsElementVisible( LAYER_MOD_REFERENCES )
|
&& board->IsElementVisible( LAYER_MOD_REFERENCES )
|
||||||
&& board->IsElementVisible( LAYER_MOD_TEXT_FR );
|
&& board->IsElementVisible( LAYER_MOD_TEXT );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -400,10 +400,7 @@ double FP_TEXT::ViewGetLOD( int aLayer, KIGFX::VIEW* aView ) const
|
||||||
if( IsParentFlipped() && !aView->IsLayerVisible( LAYER_MOD_BK ) )
|
if( IsParentFlipped() && !aView->IsLayerVisible( LAYER_MOD_BK ) )
|
||||||
return HIDE;
|
return HIDE;
|
||||||
|
|
||||||
if( IsFrontLayer( m_layer ) && !aView->IsLayerVisible( LAYER_MOD_TEXT_FR ) )
|
if( !aView->IsLayerVisible( LAYER_MOD_TEXT ) )
|
||||||
return HIDE;
|
|
||||||
|
|
||||||
if( IsBackLayer( m_layer ) && !aView->IsLayerVisible( LAYER_MOD_TEXT_BK ) )
|
|
||||||
return HIDE;
|
return HIDE;
|
||||||
|
|
||||||
// Other layers are shown without any conditions
|
// Other layers are shown without any conditions
|
||||||
|
|
|
@ -591,8 +591,8 @@ GENERAL_COLLECTORS_GUIDE PCB_BASE_FRAME::GetCollectorsGuide()
|
||||||
|
|
||||||
// account for the globals
|
// account for the globals
|
||||||
guide.SetIgnoreMTextsMarkedNoShow( ! m_pcb->IsElementVisible( LAYER_MOD_TEXT_INVISIBLE ) );
|
guide.SetIgnoreMTextsMarkedNoShow( ! m_pcb->IsElementVisible( LAYER_MOD_TEXT_INVISIBLE ) );
|
||||||
guide.SetIgnoreMTextsOnBack( ! m_pcb->IsElementVisible( LAYER_MOD_TEXT_BK ) );
|
guide.SetIgnoreMTextsOnBack( ! m_pcb->IsElementVisible( LAYER_MOD_TEXT ) );
|
||||||
guide.SetIgnoreMTextsOnFront( ! m_pcb->IsElementVisible( LAYER_MOD_TEXT_FR ) );
|
guide.SetIgnoreMTextsOnFront( ! m_pcb->IsElementVisible( LAYER_MOD_TEXT ) );
|
||||||
guide.SetIgnoreModulesOnBack( ! m_pcb->IsElementVisible( LAYER_MOD_BK ) );
|
guide.SetIgnoreModulesOnBack( ! m_pcb->IsElementVisible( LAYER_MOD_BK ) );
|
||||||
guide.SetIgnoreModulesOnFront( ! m_pcb->IsElementVisible( LAYER_MOD_FR ) );
|
guide.SetIgnoreModulesOnFront( ! m_pcb->IsElementVisible( LAYER_MOD_FR ) );
|
||||||
guide.SetIgnorePadsOnBack( ! m_pcb->IsElementVisible( LAYER_PAD_BK ) );
|
guide.SetIgnorePadsOnBack( ! m_pcb->IsElementVisible( LAYER_PAD_BK ) );
|
||||||
|
|
|
@ -75,8 +75,7 @@ const LAYER_NUM GAL_LAYER_ORDER[] =
|
||||||
User_8, ZONE_LAYER_FOR( User_8 ),
|
User_8, ZONE_LAYER_FOR( User_8 ),
|
||||||
User_9, ZONE_LAYER_FOR( User_9 ),
|
User_9, ZONE_LAYER_FOR( User_9 ),
|
||||||
|
|
||||||
LAYER_MOD_TEXT_FR,
|
LAYER_MOD_TEXT, LAYER_MOD_REFERENCES, LAYER_MOD_VALUES,
|
||||||
LAYER_MOD_REFERENCES, LAYER_MOD_VALUES,
|
|
||||||
|
|
||||||
LAYER_RATSNEST,
|
LAYER_RATSNEST,
|
||||||
LAYER_ANCHOR,
|
LAYER_ANCHOR,
|
||||||
|
@ -134,7 +133,6 @@ const LAYER_NUM GAL_LAYER_ORDER[] =
|
||||||
B_CrtYd, ZONE_LAYER_FOR( B_CrtYd ),
|
B_CrtYd, ZONE_LAYER_FOR( B_CrtYd ),
|
||||||
B_Fab, ZONE_LAYER_FOR( B_Fab ),
|
B_Fab, ZONE_LAYER_FOR( B_Fab ),
|
||||||
|
|
||||||
LAYER_MOD_TEXT_BK,
|
|
||||||
LAYER_DRAWINGSHEET
|
LAYER_DRAWINGSHEET
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -607,12 +605,10 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
|
||||||
|
|
||||||
// Front footprints
|
// Front footprints
|
||||||
m_view->SetRequired( LAYER_PAD_FR, F_Cu );
|
m_view->SetRequired( LAYER_PAD_FR, F_Cu );
|
||||||
m_view->SetRequired( LAYER_MOD_TEXT_FR, LAYER_MOD_FR );
|
|
||||||
m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR );
|
m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR );
|
||||||
|
|
||||||
// Back footprints
|
// Back footprints
|
||||||
m_view->SetRequired( LAYER_PAD_BK, B_Cu );
|
m_view->SetRequired( LAYER_PAD_BK, B_Cu );
|
||||||
m_view->SetRequired( LAYER_MOD_TEXT_BK, LAYER_MOD_BK );
|
|
||||||
m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK );
|
m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK );
|
||||||
|
|
||||||
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY, KIGFX::TARGET_OVERLAY );
|
m_view->SetLayerTarget( LAYER_SELECT_OVERLAY, KIGFX::TARGET_OVERLAY );
|
||||||
|
|
|
@ -160,8 +160,7 @@ void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet
|
||||||
setVisibility( LAYER_MOD_BK );
|
setVisibility( LAYER_MOD_BK );
|
||||||
setVisibility( LAYER_MOD_VALUES );
|
setVisibility( LAYER_MOD_VALUES );
|
||||||
setVisibility( LAYER_MOD_REFERENCES );
|
setVisibility( LAYER_MOD_REFERENCES );
|
||||||
setVisibility( LAYER_MOD_TEXT_FR );
|
setVisibility( LAYER_MOD_TEXT );
|
||||||
setVisibility( LAYER_MOD_TEXT_BK );
|
|
||||||
setVisibility( LAYER_MOD_TEXT_INVISIBLE );
|
setVisibility( LAYER_MOD_TEXT_INVISIBLE );
|
||||||
setVisibility( LAYER_PADS );
|
setVisibility( LAYER_PADS );
|
||||||
setVisibility( LAYER_PAD_FR );
|
setVisibility( LAYER_PAD_FR );
|
||||||
|
@ -209,7 +208,7 @@ void PCBNEW_PRINTOUT::setupViewLayers( KIGFX::VIEW& aView, const LSET& aLayerSet
|
||||||
// be drawn on some other (technical) layers.
|
// be drawn on some other (technical) layers.
|
||||||
const int alwaysEnabled[] =
|
const int alwaysEnabled[] =
|
||||||
{
|
{
|
||||||
LAYER_MOD_TEXT_FR, LAYER_MOD_TEXT_BK, LAYER_MOD_FR, LAYER_MOD_BK,
|
LAYER_MOD_TEXT, LAYER_MOD_FR, LAYER_MOD_BK,
|
||||||
LAYER_MOD_VALUES, LAYER_MOD_REFERENCES, LAYER_TRACKS, LAYER_ZONES, LAYER_PADS,
|
LAYER_MOD_VALUES, LAYER_MOD_REFERENCES, LAYER_TRACKS, LAYER_ZONES, LAYER_PADS,
|
||||||
LAYER_VIAS, LAYER_VIA_MICROVIA, LAYER_VIA_BBLIND,
|
LAYER_VIAS, LAYER_VIA_MICROVIA, LAYER_VIA_BBLIND,
|
||||||
LAYER_PAD_FR, LAYER_PAD_BK, LAYER_PADS_TH
|
LAYER_PAD_FR, LAYER_PAD_BK, LAYER_PADS_TH
|
||||||
|
|
|
@ -641,8 +641,8 @@ const GENERAL_COLLECTORS_GUIDE PCB_SELECTION_TOOL::getCollectorsGuide() const
|
||||||
|
|
||||||
// account for the globals
|
// account for the globals
|
||||||
guide.SetIgnoreMTextsMarkedNoShow( ! board()->IsElementVisible( LAYER_MOD_TEXT_INVISIBLE ) );
|
guide.SetIgnoreMTextsMarkedNoShow( ! board()->IsElementVisible( LAYER_MOD_TEXT_INVISIBLE ) );
|
||||||
guide.SetIgnoreMTextsOnBack( ! board()->IsElementVisible( LAYER_MOD_TEXT_BK ) );
|
guide.SetIgnoreMTextsOnBack( ! board()->IsElementVisible( LAYER_MOD_TEXT ) );
|
||||||
guide.SetIgnoreMTextsOnFront( ! board()->IsElementVisible( LAYER_MOD_TEXT_FR ) );
|
guide.SetIgnoreMTextsOnFront( ! board()->IsElementVisible( LAYER_MOD_TEXT ) );
|
||||||
guide.SetIgnoreModulesOnBack( ! board()->IsElementVisible( LAYER_MOD_BK ) );
|
guide.SetIgnoreModulesOnBack( ! board()->IsElementVisible( LAYER_MOD_BK ) );
|
||||||
guide.SetIgnoreModulesOnFront( ! board()->IsElementVisible( LAYER_MOD_FR ) );
|
guide.SetIgnoreModulesOnFront( ! board()->IsElementVisible( LAYER_MOD_FR ) );
|
||||||
guide.SetIgnorePadsOnBack( padsDisabled || ! board()->IsElementVisible( LAYER_PAD_BK ) );
|
guide.SetIgnorePadsOnBack( padsDisabled || ! board()->IsElementVisible( LAYER_PAD_BK ) );
|
||||||
|
|
|
@ -342,7 +342,7 @@ const APPEARANCE_CONTROLS::APPEARANCE_SETTING APPEARANCE_CONTROLS::s_objectSetti
|
||||||
RR( _( "Through-hole Pads" ),LAYER_PADS_TH, _( "Show through-hole pads" ) ),
|
RR( _( "Through-hole Pads" ),LAYER_PADS_TH, _( "Show through-hole pads" ) ),
|
||||||
RR( _( "Values" ), LAYER_MOD_VALUES, _( "Show footprint values" ) ),
|
RR( _( "Values" ), LAYER_MOD_VALUES, _( "Show footprint values" ) ),
|
||||||
RR( _( "References" ), LAYER_MOD_REFERENCES, _( "Show footprint references" ) ),
|
RR( _( "References" ), LAYER_MOD_REFERENCES, _( "Show footprint references" ) ),
|
||||||
RR( _( "Footprint Text" ), LAYER_MOD_TEXT_FR, _( "Show all footprint text" ) ),
|
RR( _( "Footprint Text" ), LAYER_MOD_TEXT, _( "Show all footprint text" ) ),
|
||||||
RR( _( "Hidden Text" ), LAYER_MOD_TEXT_INVISIBLE, _( "Show footprint text marked as invisible" ) ),
|
RR( _( "Hidden Text" ), LAYER_MOD_TEXT_INVISIBLE, _( "Show footprint text marked as invisible" ) ),
|
||||||
RR(),
|
RR(),
|
||||||
RR(),
|
RR(),
|
||||||
|
@ -366,7 +366,7 @@ static std::set<int> s_allowedInFpEditor =
|
||||||
LAYER_PADS_TH,
|
LAYER_PADS_TH,
|
||||||
LAYER_MOD_VALUES,
|
LAYER_MOD_VALUES,
|
||||||
LAYER_MOD_REFERENCES,
|
LAYER_MOD_REFERENCES,
|
||||||
LAYER_MOD_TEXT_FR,
|
LAYER_MOD_TEXT,
|
||||||
LAYER_MOD_TEXT_INVISIBLE,
|
LAYER_MOD_TEXT_INVISIBLE,
|
||||||
LAYER_GRID
|
LAYER_GRID
|
||||||
};
|
};
|
||||||
|
@ -1937,7 +1937,7 @@ void APPEARANCE_CONTROLS::onObjectVisibilityChanged( GAL_LAYER_ID aLayer, bool i
|
||||||
syncLayerPresetSelection();
|
syncLayerPresetSelection();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LAYER_MOD_TEXT_FR:
|
case LAYER_MOD_TEXT:
|
||||||
// Because Footprint Text is a meta-control that also can disable values/references,
|
// Because Footprint Text is a meta-control that also can disable values/references,
|
||||||
// drag them along here so that the user is less likely to be confused.
|
// drag them along here so that the user is less likely to be confused.
|
||||||
if( isFinal )
|
if( isFinal )
|
||||||
|
@ -1957,8 +1957,8 @@ void APPEARANCE_CONTROLS::onObjectVisibilityChanged( GAL_LAYER_ID aLayer, bool i
|
||||||
// meta-control is disabled, we should put it back on.
|
// meta-control is disabled, we should put it back on.
|
||||||
if( isVisible )
|
if( isVisible )
|
||||||
{
|
{
|
||||||
onObjectVisibilityChanged( LAYER_MOD_TEXT_FR, isVisible, false );
|
onObjectVisibilityChanged( LAYER_MOD_TEXT, isVisible, false );
|
||||||
m_objectSettingsMap[LAYER_MOD_TEXT_FR]->ctl_visibility->SetValue( isVisible );
|
m_objectSettingsMap[LAYER_MOD_TEXT]->ctl_visibility->SetValue( isVisible );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue