Do not cache invisible text objects

In some cases, extremely long, invisible texts can fill and crash opengl
buffers
This commit is contained in:
Seth Hillbrand 2024-02-07 15:26:41 -08:00
parent 8efd90e6e8
commit 6e0d97df76
1 changed files with 1 additions and 1 deletions

View File

@ -2042,7 +2042,7 @@ void PCB_PAINTER::draw( const PCB_TEXT* aText, int aLayer )
{ {
wxString resolvedText( aText->GetShownText( true ) ); wxString resolvedText( aText->GetShownText( true ) );
if( resolvedText.Length() == 0 ) if( resolvedText.Length() == 0 || !aText->GetAttributes().m_Visible )
return; return;
if( aLayer == LAYER_LOCKED_ITEM_SHADOW ) // happens only if locked if( aLayer == LAYER_LOCKED_ITEM_SHADOW ) // happens only if locked