Remove TEDIT

This marker is not used in KiCad and creates merge conflicts when two
different users edit the same file
This commit is contained in:
Seth Hillbrand 2022-02-25 15:09:27 -08:00
parent 58b8d63ff8
commit fab78af176
11 changed files with 7 additions and 41 deletions

View File

@ -209,7 +209,6 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
}
savedModules.insert( ent.m_item );
static_cast<FOOTPRINT*>( ent.m_item )->SetLastEditTime();
}
}

View File

@ -1647,8 +1647,6 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
if( footprint )
{
footprint->SetLastEditTime();
// compute the pos 0 value, i.e. pad position for footprint with orientation = 0
// i.e. relative to footprint origin (footprint position)
VECTOR2I pt = m_currentPad->GetPosition() - footprint->GetPosition();

View File

@ -336,20 +336,6 @@ public:
bool LegacyPadsLocked() const { return m_fpStatus & FP_PADS_are_LOCKED; }
/*
void SetPadsLocked( bool aPadsLocked )
{
if( aPadsLocked )
m_fpStatus |= FP_PADS_are_LOCKED;
else
m_fpStatus &= ~FP_PADS_are_LOCKED;
}
*/
void SetLastEditTime( timestamp_t aTime ) { m_lastEditTime = aTime; }
void SetLastEditTime() { m_lastEditTime = time( nullptr ); }
timestamp_t GetLastEditTime() const { return m_lastEditTime; }
/**
* Test if footprint attributes for type (SMD/Through hole/Other) match the expected
* type based on the pads in the footprint.

View File

@ -1177,9 +1177,6 @@ FOOTPRINT* PCB_BASE_FRAME::CreateNewFootprint( const wxString& aFootprintName, b
// Creates the new footprint and add it to the head of the linked list of footprints
FOOTPRINT* footprint = new FOOTPRINT( GetBoard() );
// Update parameters: timestamp ...
footprint->SetLastEditTime();
// Update its name in lib
footprint->SetFPID( LIB_ID( wxEmptyString, footprintName ) );

View File

@ -3543,7 +3543,7 @@ FOOTPRINT* PCB_PARSER::parseFOOTPRINT_unchecked( wxArrayString* aInitialComments
}
case T_tedit:
footprint->SetLastEditTime( parseHex() );
parseHex();
NeedRIGHT();
break;

View File

@ -1134,12 +1134,9 @@ void PCB_PLUGIN::format( const FOOTPRINT* aFootprint, int aNestLevel ) const
formatLayer( aFootprint->GetLayer() );
m_out->Print( 0, "\n" );
m_out->Print( aNestLevel+1, "(tedit %lX)", (unsigned long)aFootprint->GetLastEditTime() );
if( !( m_ctl & CTL_OMIT_TSTAMPS ) )
m_out->Print( 0, " (tstamp %s)", TO_UTF8( aFootprint->m_Uuid.AsString() ) );
m_out->Print( 0, "\n" );
m_out->Print( aNestLevel+1, "(tstamp %s)\n", TO_UTF8( aFootprint->m_Uuid.AsString() ) );
if( !( m_ctl & CTL_OMIT_AT ) )
{

View File

@ -116,7 +116,8 @@ class SHAPE_LINE_CHAIN;
//#define SEXPR_BOARD_FILE_VERSION 20211231 // Private footprint layers
//#define SEXPR_BOARD_FILE_VERSION 20211232 // Fonts
//#define SEXPR_BOARD_FILE_VERSION 20220131 // Textboxes
#define SEXPR_BOARD_FILE_VERSION 20220211 // End support for V5 zone fill strategy
//#define SEXPR_BOARD_FILE_VERSION 20220211 // End support for V5 zone fill strategy
#define SEXPR_BOARD_FILE_VERSION 20220225 // Remove TEDIT
#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

@ -1179,7 +1179,9 @@ void LEGACY_PLUGIN::loadFOOTPRINT( FOOTPRINT* aFootprint )
int orient = intParse( data, &data );
int layer_num = intParse( data, &data );
PCB_LAYER_ID layer_id = leg_layer2new( m_cu_count, layer_num );
long edittime = hexParse( data, &data );
[[maybe_unused]] long edittime = hexParse( data, &data );
char* uuid = strtok_r( (char*) data, delims, (char**) &data );
data = strtok_r( (char*) data+1, delims, (char**) &data );
@ -1196,7 +1198,6 @@ void LEGACY_PLUGIN::loadFOOTPRINT( FOOTPRINT* aFootprint )
aFootprint->SetLayer( layer_id );
aFootprint->SetOrientation( EDA_ANGLE( orient, TENTHS_OF_A_DEGREE_T ) );
const_cast<KIID&>( aFootprint->m_Uuid ) = KIID( uuid );
aFootprint->SetLastEditTime( edittime );
}
else if( TESTLINE( "Sc" ) ) // timestamp
{

View File

@ -510,7 +510,6 @@ void PCB_FOOTPRINT::AddToBoard()
footprint->SetPosition( VECTOR2I( m_positionX, m_positionY ) );
footprint->SetLayer( m_Mirror ? B_Cu : F_Cu );
footprint->SetOrientation( m_rotation );
footprint->SetLastEditTime( 0 );
LIB_ID fpID;
fpID.Parse( m_compRef, true );

View File

@ -1236,16 +1236,6 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
msg = footprint->GetFPID().GetLibItemName().wx_str();
msgItems.emplace_back( MSG_PANEL_ITEM( _( "Footprint Name" ), msg ) );
wxDateTime date( static_cast<time_t>( footprint->GetLastEditTime() ) );
if( footprint->GetLastEditTime() && date.IsValid() )
// Date format: see http://www.cplusplus.com/reference/ctime/strftime
msg = date.Format( wxT( "%b %d, %Y" ) ); // Abbreviated_month_name Day, Year
else
msg = _( "Unknown" );
msgItems.emplace_back( MSG_PANEL_ITEM( _( "Last Change" ), msg ) );
msg.Printf( wxT( "%zu" ), (size_t) footprint->GetPadCount( DO_NOT_INCLUDE_NPTH ) );
msgItems.emplace_back( MSG_PANEL_ITEM( _( "Pads" ), msg ) );

View File

@ -228,8 +228,6 @@ void PCB_BASE_EDIT_FRAME::saveCopyInUndoList( PICKED_ITEMS_LIST* commandToUndo,
ITEM_PICKER picker( nullptr, item, UNDO_REDO::CHANGED );
picker.SetLink( clone );
commandToUndo->PushItem( picker );
orig->SetLastEditTime();
}
else
{