Show variable references of text in status bar.

Fixes https://gitlab.com/kicad/code/kicad/issues/7790
This commit is contained in:
Jeff Young 2021-03-03 16:38:41 +00:00
parent 49ce32b403
commit b9d26a55f2
3 changed files with 8 additions and 3 deletions

View File

@ -659,7 +659,8 @@ void SCH_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aList )
default: return;
}
aList.push_back( MSG_PANEL_ITEM( msg, GetShownText() ) );
// Don't use GetShownText() here; we want to show the user the variable references
aList.push_back( MSG_PANEL_ITEM( msg, UnescapeString( GetText() ) ) );
switch( GetLabelSpinStyle() )
{

View File

@ -31,6 +31,7 @@
#include <footprint.h>
#include <settings/settings_manager.h>
#include <trigo.h>
#include <kicad_string.h>
FP_TEXT::FP_TEXT( FOOTPRINT* aParentFootprint, TEXT_TYPE text_type ) :
BOARD_ITEM( aParentFootprint, PCB_FP_TEXT_T ),
@ -282,7 +283,8 @@ void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
aList.emplace_back( _( "Footprint" ), fp ? fp->GetReference() : _( "<invalid>" ) );
aList.emplace_back( _( "Text" ), GetShownText() );
// Don't use GetShownText() here; we want to show the user the variable references
aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
wxASSERT( m_Type >= TEXT_is_REFERENCE && m_Type <= TEXT_is_DIVERS );
aList.emplace_back( _( "Type" ), text_type_msg[m_Type] );

View File

@ -32,6 +32,7 @@
#include <pcb_text.h>
#include <pcb_painter.h>
#include <trigo.h>
#include <kicad_string.h>
using KIGFX::PCB_RENDER_SETTINGS;
@ -108,7 +109,8 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
{
EDA_UNITS units = aFrame->GetUserUnits();
aList.emplace_back( _( "PCB Text" ), GetShownText() );
// Don't use GetShownText() here; we want to show the user the variable references
aList.emplace_back( _( "PCB Text" ), UnescapeString( GetText() ) );
if( IsLocked() )
aList.emplace_back( _( "Status" ), _( "locked" ) );