PCB_TARGET: add missing GetMsgPanelInfo() virtual function.

This commit is contained in:
jean-pierre charras 2020-12-31 15:46:40 +01:00
parent 829670a2e5
commit 381aabdd2a
2 changed files with 20 additions and 3 deletions

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
@ -33,6 +33,7 @@
#include <trigo.h>
#include <i18n_utility.h>
#include <geometry/shape_circle.h>
#include <eda_draw_frame.h>
PCB_TARGET::PCB_TARGET( BOARD_ITEM* aParent ) :
BOARD_ITEM( aParent, PCB_TARGET_T )
@ -143,6 +144,20 @@ void PCB_TARGET::SwapData( BOARD_ITEM* aImage )
}
void PCB_TARGET::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
{
EDA_UNITS units = aFrame->GetUserUnits();
aList.emplace_back( _( "PCB Target" ), wxEmptyString );
aList.emplace_back( _( "Layer" ), GetLayerName() );
aList.emplace_back( _( "Size" ), MessageTextFromValue( units, GetSize() ) );
aList.emplace_back( _( "Width" ), MessageTextFromValue( units, GetWidth() ) );
aList.emplace_back( _( "Shape" ), GetShape() == 0 ? "+" : "X" );
}
static struct PCB_TARGET_DESC
{
PCB_TARGET_DESC()

View File

@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -99,6 +99,8 @@ public:
virtual void SwapData( BOARD_ITEM* aImage ) override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
#endif