Convert overbar syntax in bus aliases.
Fixes https://gitlab.com/kicad/code/kicad/issues/8647
This commit is contained in:
parent
a31b667e2a
commit
6d223931fb
|
@ -63,4 +63,5 @@
|
||||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210126 // Fix bug with writing pin uuids.
|
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210126 // Fix bug with writing pin uuids.
|
||||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210406 // Add schematic level uuids.
|
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210406 // Add schematic level uuids.
|
||||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210606 // Change overbar syntax from `~...~` to `~{...}`.
|
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210606 // Change overbar syntax from `~...~` to `~{...}`.
|
||||||
#define SEXPR_SCHEMATIC_FILE_VERSION 20210615 // Update overbar syntax in net names.
|
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210615 // Update overbar syntax in net names.
|
||||||
|
#define SEXPR_SCHEMATIC_FILE_VERSION 20210621 // Update overbar syntax in bus aliases.
|
||||||
|
|
|
@ -3013,10 +3013,19 @@ void SCH_SEXPR_PARSER::parseBusAlias( SCH_SCREEN* aScreen )
|
||||||
wxCHECK( aScreen, /* void */ );
|
wxCHECK( aScreen, /* void */ );
|
||||||
|
|
||||||
T token;
|
T token;
|
||||||
auto busAlias = std::make_shared<BUS_ALIAS>( aScreen );
|
std::shared_ptr<BUS_ALIAS> busAlias = std::make_shared<BUS_ALIAS>( aScreen );
|
||||||
|
wxString alias;
|
||||||
|
wxString member;
|
||||||
|
|
||||||
NeedSYMBOL();
|
NeedSYMBOL();
|
||||||
busAlias->SetName( FromUTF8() );
|
|
||||||
|
alias = FromUTF8();
|
||||||
|
|
||||||
|
if( m_requiredVersion < 20210621 )
|
||||||
|
alias = ConvertToNewOverbarNotation( alias );
|
||||||
|
|
||||||
|
busAlias->SetName( alias );
|
||||||
|
|
||||||
NeedLEFT();
|
NeedLEFT();
|
||||||
token = NextTok();
|
token = NextTok();
|
||||||
|
|
||||||
|
@ -3030,7 +3039,13 @@ void SCH_SEXPR_PARSER::parseBusAlias( SCH_SCREEN* aScreen )
|
||||||
if( !IsSymbol( token ) )
|
if( !IsSymbol( token ) )
|
||||||
Expecting( "quoted string" );
|
Expecting( "quoted string" );
|
||||||
|
|
||||||
busAlias->AddMember( FromUTF8() );
|
member = FromUTF8();
|
||||||
|
|
||||||
|
if( m_requiredVersion < 20210621 )
|
||||||
|
member = ConvertToNewOverbarNotation( member );
|
||||||
|
|
||||||
|
busAlias->AddMember( member );
|
||||||
|
|
||||||
token = NextTok();
|
token = NextTok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue