No sheet path has to be interpreted as the current sheet.
There's currently waaaay too much stuff that depends on it. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14834
This commit is contained in:
parent
8820df2187
commit
d526362d31
|
@ -243,6 +243,16 @@ wxString SCH_FIELD::GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraT
|
|||
}
|
||||
|
||||
|
||||
wxString SCH_FIELD::GetShownText( bool aAllowExtraText, int aDepth ) const
|
||||
{
|
||||
if( SCHEMATIC* schematic = Schematic() )
|
||||
return GetShownText( &schematic->CurrentSheet(), aAllowExtraText, aDepth );
|
||||
else
|
||||
return EDA_TEXT::GetShownText( aAllowExtraText, aDepth );
|
||||
}
|
||||
|
||||
|
||||
|
||||
int SCH_FIELD::GetPenWidth() const
|
||||
{
|
||||
return GetEffectiveTextPenWidth();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2022 CERN
|
||||
* Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2004-2023 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
|
||||
|
@ -129,10 +129,7 @@ public:
|
|||
wxString GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraText,
|
||||
int aDepth = 0 ) const;
|
||||
|
||||
wxString GetShownText( bool aAllowExtraText, int aDepth = 0 ) const override
|
||||
{
|
||||
return GetShownText( nullptr, aAllowExtraText, aDepth );
|
||||
}
|
||||
wxString GetShownText( bool aAllowExtraText, int aDepth = 0 ) const override;
|
||||
|
||||
COLOR4D GetFieldColor() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue