Add UUID to PCB tables to ensure stable file sort

This commit is contained in:
Mark Roszko 2025-09-07 09:56:04 -04:00
parent fef84a2c6a
commit bbecc4eaa8
3 changed files with 10 additions and 1 deletions

View File

@ -2181,6 +2181,8 @@ void PCB_IO_KICAD_SEXPR::format( const PCB_TABLE* aTable ) const
m_out->Print( "(table (column_count %d)", aTable->GetColCount() );
KICAD_FORMAT::FormatUuid( m_out, aTable->m_Uuid );
if( aTable->IsLocked() )
KICAD_FORMAT::FormatBool( m_out, "locked", true );

View File

@ -190,7 +190,8 @@ class PCB_IO_KICAD_SEXPR; // forward decl
//#define SEXPR_BOARD_FILE_VERSION 20250811 // press-fit pad fabr prop support
//#define SEXPR_BOARD_FILE_VERSION 20250818 // Support for custom layer counts in footprints
//#define SEXPR_BOARD_FILE_VERSION 20250829 // Support Rounded Rectangles
#define SEXPR_BOARD_FILE_VERSION 20250901 // PCB points
//#define SEXPR_BOARD_FILE_VERSION 20250901 // PCB points
#define SEXPR_BOARD_FILE_VERSION 20250907 // uuids for tables
#define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag
#define LEGACY_ARC_FORMATTING 20210925 ///< These were the last to use old arc formatting

View File

@ -3862,6 +3862,12 @@ PCB_TABLE* PCB_IO_KICAD_SEXPR_PARSER::parsePCB_TABLE( BOARD_ITEM* aParent )
NeedRIGHT();
break;
case T_uuid:
NextTok();
const_cast<KIID&>( table->m_Uuid ) = CurStrToKIID();
NeedRIGHT();
break;
case T_locked:
table->SetLocked( parseBool() );
NeedRIGHT();