Fully order schematic saves
This commit is contained in:
parent
e538b98286
commit
e14e956c1d
|
@ -648,9 +648,6 @@ void SCH_IO_KICAD_SEXPR::saveSymbol( SCH_SYMBOL* aSymbol, const SCHEMATIC& aSche
|
|||
{
|
||||
wxCHECK_RET( aSymbol != nullptr && m_out != nullptr, "" );
|
||||
|
||||
// Sort symbol instance data to minimize file churn.
|
||||
aSymbol->SortInstances( SortSymbolInstancesByProjectUuid );
|
||||
|
||||
std::string libName;
|
||||
|
||||
wxString symbol_name = aSymbol->GetLibId().Format();
|
||||
|
|
|
@ -94,16 +94,6 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
|
||||
bool SortSymbolInstancesByProjectUuid( const SCH_SYMBOL_INSTANCE& aLhs,
|
||||
const SCH_SYMBOL_INSTANCE& aRhs )
|
||||
{
|
||||
wxCHECK( !aLhs.m_Path.empty() && !aRhs.m_Path.empty(), false );
|
||||
|
||||
return aLhs.m_Path[0] < aRhs.m_Path[0];
|
||||
}
|
||||
|
||||
|
||||
namespace std
|
||||
{
|
||||
size_t hash<SCH_SHEET_PATH>::operator()( const SCH_SHEET_PATH& path ) const
|
||||
|
|
|
@ -58,10 +58,6 @@ struct SCH_SYMBOL_INSTANCE
|
|||
};
|
||||
|
||||
|
||||
extern bool SortSymbolInstancesByProjectUuid( const SCH_SYMBOL_INSTANCE& aLhs,
|
||||
const SCH_SYMBOL_INSTANCE& aRhs );
|
||||
|
||||
|
||||
/**
|
||||
* A simple container for sheet instance information.
|
||||
*/
|
||||
|
|
|
@ -625,14 +625,6 @@ void SCH_SYMBOL::RemoveInstance( const KIID_PATH& aInstancePath )
|
|||
}
|
||||
|
||||
|
||||
void SCH_SYMBOL::SortInstances( bool (*aSortFunction)( const SCH_SYMBOL_INSTANCE& aLhs,
|
||||
const SCH_SYMBOL_INSTANCE& aRhs ) )
|
||||
{
|
||||
if( m_instanceReferences.size() > 1 )
|
||||
std::sort( m_instanceReferences.begin(), m_instanceReferences.end(), aSortFunction );
|
||||
}
|
||||
|
||||
|
||||
void SCH_SYMBOL::AddHierarchicalReference( const KIID_PATH& aPath, const wxString& aRef, int aUnit )
|
||||
{
|
||||
// Search for an existing path and remove it if found (should not occur)
|
||||
|
|
|
@ -176,9 +176,6 @@ public:
|
|||
|
||||
void RemoveInstance( const KIID_PATH& aInstancePath );
|
||||
|
||||
void SortInstances( bool ( *aSortFunction )( const SCH_SYMBOL_INSTANCE& aLhs,
|
||||
const SCH_SYMBOL_INSTANCE& aRhs ) );
|
||||
|
||||
/**
|
||||
* Return true for items which are moved with the anchor point at mouse cursor
|
||||
* and false for items moved with no reference to anchor.
|
||||
|
|
Loading…
Reference in New Issue