Better way of determining if we're reporting from the footprint editor.

This commit is contained in:
Jeff Young
2025-02-19 23:43:53 +00:00
parent 006d8b290a
commit c136df247f
2 changed files with 8 additions and 12 deletions
+4 -6
View File
@@ -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() )
{