Make sure EESCHEMA definition gets passed into common.cpp.

Also includes a fix to seed timestamps that got incorrectly
written out as '00000000' because of the above.

Fixes https://gitlab.com/kicad/code/kicad/issues/3977
This commit is contained in:
Jeff Young 2020-03-04 02:02:22 +00:00
parent 85c2e0d23a
commit 21469efa63
3 changed files with 8 additions and 3 deletions

View File

@ -68,7 +68,7 @@ KIID::KIID() :
oldTimeStamp = newTimeStamp;
*this = UUID( wxString::Format( "%8.8X", newTimeStamp ) );
*this = KIID( wxString::Format( "%8.8X", newTimeStamp ) );
#endif
}

View File

@ -247,6 +247,7 @@ set( EESCHEMA_SRCS
set( EESCHEMA_COMMON_SRCS
${CMAKE_SOURCE_DIR}/common/dialogs/dialog_page_settings.cpp
${CMAKE_SOURCE_DIR}/common/dialogs/panel_display_options.cpp
${CMAKE_SOURCE_DIR}/common/common.cpp
${CMAKE_SOURCE_DIR}/common/base_screen.cpp
${CMAKE_SOURCE_DIR}/common/base_units.cpp
${CMAKE_SOURCE_DIR}/common/eda_text.cpp

View File

@ -989,7 +989,9 @@ SCH_SHEET* SCH_LEGACY_PLUGIN::loadSheet( LINE_READER& aReader )
{
wxString text;
parseUnquotedString( text, aReader, line );
const_cast<KIID&>( sheet->m_Uuid ) = KIID( text );
if( text != "00000000" )
const_cast<KIID&>( sheet->m_Uuid ) = KIID( text );
}
else if( *line == 'F' ) // Sheet field.
{
@ -1569,7 +1571,9 @@ SCH_COMPONENT* SCH_LEGACY_PLUGIN::loadComponent( LINE_READER& aReader )
wxString text;
parseUnquotedString( text, aReader, line, &line );
const_cast<KIID&>( component->m_Uuid ) = KIID( text );
if( text != "00000000" )
const_cast<KIID&>( component->m_Uuid ) = KIID( text );
}
else if( strCompare( "P", line, &line ) )
{