7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-03-30 05:56:55 +00:00

Make sure protobuf API stays consistent.

This commit is contained in:
Jeff Young 2025-02-20 17:41:04 +00:00
parent 9ca9d7120a
commit a8a1b08013
3 changed files with 7 additions and 2 deletions
api/proto
common

View File

@ -768,6 +768,8 @@ message Field
FieldId id = 1;
string name = 2;
BoardText text = 3;
// Since 9.0.1
bool visible = 4;
}

View File

@ -291,8 +291,10 @@ message TextAttributes
bool italic = 7;
bool bold = 8;
bool underlined = 9;
// Visible now exposed only at the field level
// bool visible = 10;
// Deprecated since 9.0.1 (text items are now always visible, only Fields can be hidden)
bool visible = 10;
bool mirrored = 11;
bool multiline = 12;
bool keep_upright = 13;

View File

@ -210,6 +210,7 @@ void EDA_TEXT::Serialize( google::protobuf::Any &aContainer ) const
attrs->set_italic( IsItalic() );
attrs->set_bold( IsBold() );
attrs->set_underlined( GetAttributes().m_Underlined );
attrs->set_visible( true );
attrs->set_mirrored( IsMirrored() );
attrs->set_multiline( IsMultilineAllowed() );
attrs->set_keep_upright( IsKeepUpright() );