mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Better way of determining if we're reporting from the footprint editor.
This commit is contained in:
parent
006d8b290a
commit
c136df247f
pcbnew
@ -1539,13 +1539,11 @@ wxString PAD::ShowPadAttr() const
|
||||
|
||||
wxString PAD::GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const
|
||||
{
|
||||
FOOTPRINT* parentFP = nullptr;
|
||||
FOOTPRINT* parentFP = GetParentFootprint();
|
||||
|
||||
if( EDA_DRAW_FRAME* frame = dynamic_cast<EDA_DRAW_FRAME*>( aUnitsProvider ) )
|
||||
{
|
||||
if( frame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||
parentFP = GetParentFootprint();
|
||||
}
|
||||
// Don't report parent footprint info from footprint editor, viewer, etc.
|
||||
if( GetBoard() && GetBoard()->GetBoardUse() == BOARD_USE::FPHOLDER )
|
||||
parentFP = nullptr;
|
||||
|
||||
if( GetAttribute() == PAD_ATTRIB::NPTH )
|
||||
{
|
||||
|
@ -649,13 +649,11 @@ void PCB_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
||||
|
||||
wxString PCB_SHAPE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const
|
||||
{
|
||||
FOOTPRINT* parentFP = nullptr;
|
||||
FOOTPRINT* parentFP = GetParentFootprint();
|
||||
|
||||
if( EDA_DRAW_FRAME* frame = dynamic_cast<EDA_DRAW_FRAME*>( aUnitsProvider ) )
|
||||
{
|
||||
if( frame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||
parentFP = GetParentFootprint();
|
||||
}
|
||||
// Don't report parent footprint info from footprint editor, viewer, etc.
|
||||
if( GetBoard() && GetBoard()->GetBoardUse() == BOARD_USE::FPHOLDER )
|
||||
parentFP = nullptr;
|
||||
|
||||
if( IsOnCopperLayer() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user