Add missing property to footprint texts table.

Fixes https://gitlab.com/kicad/code/kicad/issues/14357
This commit is contained in:
Jeff Young 2023-05-03 17:41:26 +01:00
parent 1118eed080
commit 600ac72a3d
2 changed files with 11 additions and 1 deletions

View File

@ -108,6 +108,7 @@ wxString FP_TEXT_GRID_TABLE::GetColLabelValue( int aCol )
case FPT_UPRIGHT: return _( "Keep Upright" );
case FPT_XOFFSET: return _( "X Offset" );
case FPT_YOFFSET: return _( "Y Offset" );
case FPT_KNOCKOUT: return _( "Knockout" );
default: wxFAIL; return wxEmptyString;
}
}
@ -140,6 +141,7 @@ bool FP_TEXT_GRID_TABLE::CanGetValueAs( int aRow, int aCol, const wxString& aTyp
case FPT_SHOWN:
case FPT_ITALIC:
case FPT_UPRIGHT:
case FPT_KNOCKOUT:
return aTypeName == wxGRID_VALUE_BOOL;
case FPT_LAYER:
@ -173,6 +175,7 @@ wxGridCellAttr* FP_TEXT_GRID_TABLE::GetAttr( int aRow, int aCol, wxGridCellAttr:
case FPT_SHOWN:
case FPT_ITALIC:
case FPT_UPRIGHT:
case FPT_KNOCKOUT:
m_boolColAttr->IncRef();
return m_boolColAttr;
@ -248,6 +251,7 @@ bool FP_TEXT_GRID_TABLE::GetValueAsBool( int aRow, int aCol )
case FPT_SHOWN: return text.IsVisible();
case FPT_ITALIC: return text.IsItalic();
case FPT_UPRIGHT: return text.IsKeepUpright();
case FPT_KNOCKOUT: return text.IsKnockout();
default:
wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a bool value" ), aCol ) );
@ -357,7 +361,12 @@ void FP_TEXT_GRID_TABLE::SetValueAsBool( int aRow, int aCol, bool aValue )
text.SetItalic( aValue );
break;
case FPT_UPRIGHT:text.SetKeepUpright( aValue );
case FPT_UPRIGHT:
text.SetKeepUpright( aValue );
break;
case FPT_KNOCKOUT:
text.SetIsKnockout( aValue );
break;
default:

View File

@ -45,6 +45,7 @@ enum FP_TEXT_COL_ORDER
FPT_UPRIGHT, // keep text upright when viewed from bottom or right of board
FPT_XOFFSET,
FPT_YOFFSET,
FPT_KNOCKOUT,
FPT_COUNT // keep as last
};