R/W uuids for junctions.
This commit is contained in:
parent
696f7c47fb
commit
b052d56c7b
|
@ -65,4 +65,5 @@
|
|||
//#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 20210615 // Update overbar syntax in net names.
|
||||
#define SEXPR_SCHEMATIC_FILE_VERSION 20210621 // Update overbar syntax in bus aliases.
|
||||
//#define SEXPR_SCHEMATIC_FILE_VERSION 20210621 // Update overbar syntax in bus aliases.
|
||||
#define SEXPR_SCHEMATIC_FILE_VERSION 20211123 // R/W uuids for junctions.
|
||||
|
|
|
@ -2650,8 +2650,14 @@ SCH_JUNCTION* SCH_SEXPR_PARSER::parseJunction()
|
|||
break;
|
||||
}
|
||||
|
||||
case T_uuid:
|
||||
NeedSYMBOL();
|
||||
const_cast<KIID&>( junction->m_Uuid ) = KIID( FromUTF8() );
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
default:
|
||||
Expecting( "at" );
|
||||
Expecting( "at, diameter, color or uuid" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1296,7 +1296,7 @@ void SCH_SEXPR_PLUGIN::saveJunction( SCH_JUNCTION* aJunction, int aNestLevel )
|
|||
{
|
||||
wxCHECK_RET( aJunction != nullptr && m_out != nullptr, "" );
|
||||
|
||||
m_out->Print( aNestLevel, "(junction (at %s %s) (diameter %s) (color %d %d %d %s))\n",
|
||||
m_out->Print( aNestLevel, "(junction (at %s %s) (diameter %s) (color %d %d %d %s)\n",
|
||||
FormatInternalUnits( aJunction->GetPosition().x ).c_str(),
|
||||
FormatInternalUnits( aJunction->GetPosition().y ).c_str(),
|
||||
FormatInternalUnits( aJunction->GetDiameter() ).c_str(),
|
||||
|
@ -1304,6 +1304,10 @@ void SCH_SEXPR_PLUGIN::saveJunction( SCH_JUNCTION* aJunction, int aNestLevel )
|
|||
KiROUND( aJunction->GetColor().g * 255.0 ),
|
||||
KiROUND( aJunction->GetColor().b * 255.0 ),
|
||||
Double2Str( aJunction->GetColor().a ).c_str() );
|
||||
|
||||
m_out->Print( aNestLevel + 1, "(uuid %s)\n", TO_UTF8( aJunction->m_Uuid.AsString() ) );
|
||||
|
||||
m_out->Print( aNestLevel, ")\n" );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue