Show variable references of text in status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/7790
This commit is contained in:
parent
49ce32b403
commit
b9d26a55f2
|
@ -659,7 +659,8 @@ void SCH_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aList )
|
||||||
default: return;
|
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() )
|
switch( GetLabelSpinStyle() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <footprint.h>
|
#include <footprint.h>
|
||||||
#include <settings/settings_manager.h>
|
#include <settings/settings_manager.h>
|
||||||
#include <trigo.h>
|
#include <trigo.h>
|
||||||
|
#include <kicad_string.h>
|
||||||
|
|
||||||
FP_TEXT::FP_TEXT( FOOTPRINT* aParentFootprint, TEXT_TYPE text_type ) :
|
FP_TEXT::FP_TEXT( FOOTPRINT* aParentFootprint, TEXT_TYPE text_type ) :
|
||||||
BOARD_ITEM( aParentFootprint, PCB_FP_TEXT_T ),
|
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( _( "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 );
|
wxASSERT( m_Type >= TEXT_is_REFERENCE && m_Type <= TEXT_is_DIVERS );
|
||||||
aList.emplace_back( _( "Type" ), text_type_msg[m_Type] );
|
aList.emplace_back( _( "Type" ), text_type_msg[m_Type] );
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <pcb_text.h>
|
#include <pcb_text.h>
|
||||||
#include <pcb_painter.h>
|
#include <pcb_painter.h>
|
||||||
#include <trigo.h>
|
#include <trigo.h>
|
||||||
|
#include <kicad_string.h>
|
||||||
|
|
||||||
using KIGFX::PCB_RENDER_SETTINGS;
|
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();
|
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() )
|
if( IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "locked" ) );
|
aList.emplace_back( _( "Status" ), _( "locked" ) );
|
||||||
|
|
Loading…
Reference in New Issue