mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 12:31:41 +00:00
Expunge the use of the word part from Eeschema code.
This commit is contained in:
parent
4418707e5e
commit
ee3eac325d
eeschema
class_library.cppclass_library.hsch_screen.cppsch_screen.hsch_sheet_path.cppsch_symbol.cppsch_symbol.h
dialogs
dialog_edit_one_field.cppdialog_global_edit_text_and_graphics.cppdialog_lib_symbol_properties.cppdialog_pin_properties.cppdialog_symbol_properties.cppdialog_symbol_remap.cppdialog_symbol_remap.h
eeschema_id.herc.cppfiles-io.cppgetpart.cppinvoke_sch_dialog.hlib_pin.cpplib_symbol.cpplib_symbol.hlibarch.cppnetlist_exporters
netlist_exporter_base.cppnetlist_exporter_orcadpcb2.cppnetlist_exporter_pspice.cppnetlist_exporter_xml.cpp
project_rescue.cppproject_rescue.hsch_base_frame.cppsch_base_frame.hsch_edit_frame.cppsch_field.cppsch_io_mgr.hsch_painter.cppsch_plugins
cadstar
eagle
kicad
legacy
symbol_editor
symbol_edit_frame.cppsymbol_edit_frame.hsymbol_editor.cppsymbol_editor_import_export.cppsymbol_editor_plotter.cppsymbol_editor_undo_redo.cppsymbol_library_manager.cppsymbol_library_manager.htoolbars_symbol_editor.cpp
symbol_tree_synchronizing_adapter.cppsymbol_viewer_frame.cpptoolbars_symbol_viewer.cpptools
include
qa/eeschema
@ -54,11 +54,11 @@
|
||||
"This may cause some unexpected behavior when loading symbols into a schematic." )
|
||||
|
||||
|
||||
PART_LIB::PART_LIB( SCH_LIB_TYPE aType, const wxString& aFileName,
|
||||
SYMBOL_LIB::SYMBOL_LIB( SCH_LIB_TYPE aType, const wxString& aFileName,
|
||||
SCH_IO_MGR::SCH_FILE_T aPluginType ) :
|
||||
// start @ != 0 so each additional library added
|
||||
// is immediately detectable, zero would not be.
|
||||
m_mod_hash( PART_LIBS::GetModifyGeneration() ),
|
||||
m_mod_hash( SYMBOL_LIBS::GetModifyGeneration() ),
|
||||
m_pluginType( aPluginType )
|
||||
{
|
||||
type = aType;
|
||||
@ -78,12 +78,12 @@ PART_LIB::PART_LIB( SCH_LIB_TYPE aType, const wxString& aFileName,
|
||||
}
|
||||
|
||||
|
||||
PART_LIB::~PART_LIB()
|
||||
SYMBOL_LIB::~SYMBOL_LIB()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::Save( bool aSaveDocFile )
|
||||
void SYMBOL_LIB::Save( bool aSaveDocFile )
|
||||
{
|
||||
wxCHECK_RET( m_plugin != nullptr, wxString::Format( "no plugin defined for library `%s`.",
|
||||
fileName.GetFullPath() ) );
|
||||
@ -98,7 +98,7 @@ void PART_LIB::Save( bool aSaveDocFile )
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::Create( const wxString& aFileName )
|
||||
void SYMBOL_LIB::Create( const wxString& aFileName )
|
||||
{
|
||||
wxString tmpFileName = fileName.GetFullPath();
|
||||
|
||||
@ -109,7 +109,7 @@ void PART_LIB::Create( const wxString& aFileName )
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::SetPluginType( SCH_IO_MGR::SCH_FILE_T aPluginType )
|
||||
void SYMBOL_LIB::SetPluginType( SCH_IO_MGR::SCH_FILE_T aPluginType )
|
||||
{
|
||||
if( m_pluginType != aPluginType )
|
||||
{
|
||||
@ -119,25 +119,25 @@ void PART_LIB::SetPluginType( SCH_IO_MGR::SCH_FILE_T aPluginType )
|
||||
}
|
||||
|
||||
|
||||
bool PART_LIB::IsCache() const
|
||||
bool SYMBOL_LIB::IsCache() const
|
||||
{
|
||||
return m_properties->Exists( SCH_LEGACY_PLUGIN::PropNoDocFile );
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::SetCache()
|
||||
void SYMBOL_LIB::SetCache()
|
||||
{
|
||||
(*m_properties)[ SCH_LEGACY_PLUGIN::PropNoDocFile ] = "";
|
||||
}
|
||||
|
||||
|
||||
bool PART_LIB::IsBuffering() const
|
||||
bool SYMBOL_LIB::IsBuffering() const
|
||||
{
|
||||
return m_properties->Exists( SCH_LEGACY_PLUGIN::PropBuffering );
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::EnableBuffering( bool aEnable )
|
||||
void SYMBOL_LIB::EnableBuffering( bool aEnable )
|
||||
{
|
||||
if( aEnable )
|
||||
(*m_properties)[ SCH_LEGACY_PLUGIN::PropBuffering ] = "";
|
||||
@ -146,7 +146,7 @@ void PART_LIB::EnableBuffering( bool aEnable )
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::GetPartNames( wxArrayString& aNames ) const
|
||||
void SYMBOL_LIB::GetSymbolNames( wxArrayString& aNames ) const
|
||||
{
|
||||
m_plugin->EnumerateSymbolLib( aNames, fileName.GetFullPath(), m_properties.get() );
|
||||
|
||||
@ -154,7 +154,7 @@ void PART_LIB::GetPartNames( wxArrayString& aNames ) const
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::GetParts( std::vector<LIB_SYMBOL*>& aSymbols ) const
|
||||
void SYMBOL_LIB::GetSymbols( std::vector<LIB_SYMBOL*>& aSymbols ) const
|
||||
{
|
||||
m_plugin->EnumerateSymbolLib( aSymbols, fileName.GetFullPath(), m_properties.get() );
|
||||
|
||||
@ -164,7 +164,7 @@ void PART_LIB::GetParts( std::vector<LIB_SYMBOL*>& aSymbols ) const
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* PART_LIB::FindPart( const wxString& aName ) const
|
||||
LIB_SYMBOL* SYMBOL_LIB::FindSymbol( const wxString& aName ) const
|
||||
{
|
||||
LIB_SYMBOL* symbol = m_plugin->LoadSymbol( fileName.GetFullPath(), aName, m_properties.get() );
|
||||
|
||||
@ -172,19 +172,19 @@ LIB_SYMBOL* PART_LIB::FindPart( const wxString& aName ) const
|
||||
// symbols. This allows the symbol library table conversion tool to determine the
|
||||
// correct library where the symbol was found.
|
||||
if( symbol && !symbol->GetLib() )
|
||||
symbol->SetLib( const_cast<PART_LIB*>( this ) );
|
||||
symbol->SetLib( const_cast<SYMBOL_LIB*>( this ) );
|
||||
|
||||
return symbol;
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* PART_LIB::FindPart( const LIB_ID& aLibId ) const
|
||||
LIB_SYMBOL* SYMBOL_LIB::FindSymbol( const LIB_ID& aLibId ) const
|
||||
{
|
||||
return FindPart( aLibId.Format().wx_str() );
|
||||
return FindSymbol( aLibId.Format().wx_str() );
|
||||
}
|
||||
|
||||
|
||||
void PART_LIB::AddPart( LIB_SYMBOL* aSymbol )
|
||||
void SYMBOL_LIB::AddSymbol( LIB_SYMBOL* aSymbol )
|
||||
{
|
||||
// add a clone, not the caller's copy, the plugin take ownership of the new symbol.
|
||||
m_plugin->SaveSymbol( fileName.GetFullPath(),
|
||||
@ -200,7 +200,7 @@ void PART_LIB::AddPart( LIB_SYMBOL* aSymbol )
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* PART_LIB::RemovePart( LIB_SYMBOL* aEntry )
|
||||
LIB_SYMBOL* SYMBOL_LIB::RemoveSymbol( LIB_SYMBOL* aEntry )
|
||||
{
|
||||
wxCHECK_MSG( aEntry != nullptr, nullptr, "NULL pointer cannot be removed from library." );
|
||||
|
||||
@ -216,14 +216,14 @@ LIB_SYMBOL* PART_LIB::RemovePart( LIB_SYMBOL* aEntry )
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* PART_LIB::ReplacePart( LIB_SYMBOL* aOldPart, LIB_SYMBOL* aNewPart )
|
||||
LIB_SYMBOL* SYMBOL_LIB::ReplaceSymbol( LIB_SYMBOL* aOldSymbol, LIB_SYMBOL* aNewSymbol )
|
||||
{
|
||||
wxASSERT( aOldPart != nullptr );
|
||||
wxASSERT( aNewPart != nullptr );
|
||||
wxASSERT( aOldSymbol != nullptr );
|
||||
wxASSERT( aNewSymbol != nullptr );
|
||||
|
||||
m_plugin->DeleteSymbol( fileName.GetFullPath(), aOldPart->GetName(), m_properties.get() );
|
||||
m_plugin->DeleteSymbol( fileName.GetFullPath(), aOldSymbol->GetName(), m_properties.get() );
|
||||
|
||||
LIB_SYMBOL* my_part = new LIB_SYMBOL( *aNewPart, this );
|
||||
LIB_SYMBOL* my_part = new LIB_SYMBOL( *aNewSymbol, this );
|
||||
|
||||
m_plugin->SaveSymbol( fileName.GetFullPath(), my_part, m_properties.get() );
|
||||
|
||||
@ -237,13 +237,14 @@ LIB_SYMBOL* PART_LIB::ReplacePart( LIB_SYMBOL* aOldPart, LIB_SYMBOL* aNewPart )
|
||||
}
|
||||
|
||||
|
||||
PART_LIB* PART_LIB::LoadLibrary( const wxString& aFileName )
|
||||
SYMBOL_LIB* SYMBOL_LIB::LoadLibrary( const wxString& aFileName )
|
||||
{
|
||||
std::unique_ptr<PART_LIB> lib = std::make_unique<PART_LIB>( SCH_LIB_TYPE::LT_EESCHEMA, aFileName );
|
||||
std::unique_ptr<SYMBOL_LIB> lib = std::make_unique<SYMBOL_LIB>( SCH_LIB_TYPE::LT_EESCHEMA,
|
||||
aFileName );
|
||||
|
||||
std::vector<LIB_SYMBOL*> parts;
|
||||
// This loads the library.
|
||||
lib->GetParts( parts );
|
||||
lib->GetSymbols( parts );
|
||||
|
||||
// Now, set the LIB_SYMBOL m_library member but it will only be used
|
||||
// when loading legacy libraries in the future. Once the symbols in the
|
||||
@ -255,14 +256,14 @@ PART_LIB* PART_LIB::LoadLibrary( const wxString& aFileName )
|
||||
part->SetLib( lib.get() );
|
||||
}
|
||||
|
||||
PART_LIB* ret = lib.release();
|
||||
SYMBOL_LIB* ret = lib.release();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName )
|
||||
SYMBOL_LIB* SYMBOL_LIBS::AddLibrary( const wxString& aFileName )
|
||||
{
|
||||
PART_LIB* lib;
|
||||
SYMBOL_LIB* lib;
|
||||
|
||||
wxFileName fn = aFileName;
|
||||
// Don't reload the library if it is already loaded.
|
||||
@ -273,7 +274,7 @@ PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName )
|
||||
|
||||
try
|
||||
{
|
||||
lib = PART_LIB::LoadLibrary( aFileName );
|
||||
lib = SYMBOL_LIB::LoadLibrary( aFileName );
|
||||
push_back( lib );
|
||||
|
||||
return lib;
|
||||
@ -285,18 +286,18 @@ PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName )
|
||||
}
|
||||
|
||||
|
||||
PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator )
|
||||
SYMBOL_LIB* SYMBOL_LIBS::AddLibrary( const wxString& aFileName, SYMBOL_LIBS::iterator& aIterator )
|
||||
{
|
||||
// Don't reload the library if it is already loaded.
|
||||
wxFileName fn( aFileName );
|
||||
PART_LIB* lib = FindLibrary( fn.GetName() );
|
||||
SYMBOL_LIB* lib = FindLibrary( fn.GetName() );
|
||||
|
||||
if( lib )
|
||||
return lib;
|
||||
|
||||
try
|
||||
{
|
||||
lib = PART_LIB::LoadLibrary( aFileName );
|
||||
lib = SYMBOL_LIB::LoadLibrary( aFileName );
|
||||
|
||||
if( aIterator >= begin() && aIterator < end() )
|
||||
insert( aIterator, lib );
|
||||
@ -312,9 +313,9 @@ PART_LIB* PART_LIBS::AddLibrary( const wxString& aFileName, PART_LIBS::iterator&
|
||||
}
|
||||
|
||||
|
||||
PART_LIB* PART_LIBS::FindLibrary( const wxString& aName )
|
||||
SYMBOL_LIB* SYMBOL_LIBS::FindLibrary( const wxString& aName )
|
||||
{
|
||||
for( PART_LIBS::iterator it = begin(); it!=end(); ++it )
|
||||
for( SYMBOL_LIBS::iterator it = begin(); it!=end(); ++it )
|
||||
{
|
||||
if( it->GetName() == aName )
|
||||
return &*it;
|
||||
@ -324,9 +325,9 @@ PART_LIB* PART_LIBS::FindLibrary( const wxString& aName )
|
||||
}
|
||||
|
||||
|
||||
PART_LIB* PART_LIBS::GetCacheLibrary()
|
||||
SYMBOL_LIB* SYMBOL_LIBS::GetCacheLibrary()
|
||||
{
|
||||
for( PART_LIBS::iterator it = begin(); it!=end(); ++it )
|
||||
for( SYMBOL_LIBS::iterator it = begin(); it!=end(); ++it )
|
||||
{
|
||||
if( it->IsCache() )
|
||||
return &*it;
|
||||
@ -336,9 +337,9 @@ PART_LIB* PART_LIBS::GetCacheLibrary()
|
||||
}
|
||||
|
||||
|
||||
PART_LIB* PART_LIBS::FindLibraryByFullFileName( const wxString& aFullFileName )
|
||||
SYMBOL_LIB* SYMBOL_LIBS::FindLibraryByFullFileName( const wxString& aFullFileName )
|
||||
{
|
||||
for( PART_LIBS::iterator it = begin(); it!=end(); ++it )
|
||||
for( SYMBOL_LIBS::iterator it = begin(); it!=end(); ++it )
|
||||
{
|
||||
if( it->GetFullFileName() == aFullFileName )
|
||||
return &*it;
|
||||
@ -348,12 +349,12 @@ PART_LIB* PART_LIBS::FindLibraryByFullFileName( const wxString& aFullFileName )
|
||||
}
|
||||
|
||||
|
||||
wxArrayString PART_LIBS::GetLibraryNames( bool aSorted )
|
||||
wxArrayString SYMBOL_LIBS::GetLibraryNames( bool aSorted )
|
||||
{
|
||||
wxArrayString cacheNames;
|
||||
wxArrayString names;
|
||||
|
||||
for( PART_LIB& lib : *this )
|
||||
for( SYMBOL_LIB& lib : *this )
|
||||
{
|
||||
if( lib.IsCache() && aSorted )
|
||||
cacheNames.Add( lib.GetName() );
|
||||
@ -372,16 +373,16 @@ wxArrayString PART_LIBS::GetLibraryNames( bool aSorted )
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL* PART_LIBS::FindLibPart( const LIB_ID& aLibId, const wxString& aLibraryName )
|
||||
LIB_SYMBOL* SYMBOL_LIBS::FindLibSymbol( const LIB_ID& aLibId, const wxString& aLibraryName )
|
||||
{
|
||||
LIB_SYMBOL* part = nullptr;
|
||||
|
||||
for( PART_LIB& lib : *this )
|
||||
for( SYMBOL_LIB& lib : *this )
|
||||
{
|
||||
if( !aLibraryName.IsEmpty() && lib.GetName() != aLibraryName )
|
||||
continue;
|
||||
|
||||
part = lib.FindPart( aLibId.GetLibItemName().wx_str() );
|
||||
part = lib.FindSymbol( aLibId.GetLibItemName().wx_str() );
|
||||
|
||||
if( part )
|
||||
break;
|
||||
@ -391,18 +392,18 @@ LIB_SYMBOL* PART_LIBS::FindLibPart( const LIB_ID& aLibId, const wxString& aLibra
|
||||
}
|
||||
|
||||
|
||||
void PART_LIBS::FindLibraryNearEntries( std::vector<LIB_SYMBOL*>& aCandidates,
|
||||
const wxString& aEntryName,
|
||||
const wxString& aLibraryName )
|
||||
void SYMBOL_LIBS::FindLibraryNearEntries( std::vector<LIB_SYMBOL*>& aCandidates,
|
||||
const wxString& aEntryName,
|
||||
const wxString& aLibraryName )
|
||||
{
|
||||
for( PART_LIB& lib : *this )
|
||||
for( SYMBOL_LIB& lib : *this )
|
||||
{
|
||||
if( !aLibraryName.IsEmpty() && lib.GetName() != aLibraryName )
|
||||
continue;
|
||||
|
||||
wxArrayString partNames;
|
||||
|
||||
lib.GetPartNames( partNames );
|
||||
lib.GetSymbolNames( partNames );
|
||||
|
||||
if( partNames.IsEmpty() )
|
||||
continue;
|
||||
@ -410,36 +411,36 @@ void PART_LIBS::FindLibraryNearEntries( std::vector<LIB_SYMBOL*>& aCandidates,
|
||||
for( size_t i = 0; i < partNames.size(); i++ )
|
||||
{
|
||||
if( partNames[i].CmpNoCase( aEntryName ) == 0 )
|
||||
aCandidates.push_back( lib.FindPart( partNames[i] ) );
|
||||
aCandidates.push_back( lib.FindSymbol( partNames[i] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int PART_LIBS::s_modify_generation = 1; // starts at 1 and goes up
|
||||
std::mutex PART_LIBS::s_generationMutex;
|
||||
int SYMBOL_LIBS::s_modify_generation = 1; // starts at 1 and goes up
|
||||
std::mutex SYMBOL_LIBS::s_generationMutex;
|
||||
|
||||
|
||||
int PART_LIBS::GetModifyHash()
|
||||
int SYMBOL_LIBS::GetModifyHash()
|
||||
{
|
||||
int hash = 0;
|
||||
|
||||
for( PART_LIBS::const_iterator it = begin(); it != end(); ++it )
|
||||
for( SYMBOL_LIBS::const_iterator it = begin(); it != end(); ++it )
|
||||
{
|
||||
hash += it->GetModHash();
|
||||
}
|
||||
|
||||
// Rebuilding the cache (m_cache) does not change the GetModHash() value,
|
||||
// but changes PART_LIBS::s_modify_generation.
|
||||
// but changes SYMBOL_LIBS::s_modify_generation.
|
||||
// Take this change in account:
|
||||
hash += PART_LIBS::GetModifyGeneration();
|
||||
hash += SYMBOL_LIBS::GetModifyGeneration();
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
void PART_LIBS::LibNamesAndPaths( PROJECT* aProject, bool doSave,
|
||||
wxString* aPaths, wxArrayString* aNames )
|
||||
void SYMBOL_LIBS::LibNamesAndPaths( PROJECT* aProject, bool doSave,
|
||||
wxString* aPaths, wxArrayString* aNames )
|
||||
{
|
||||
wxCHECK_RET( aProject, "Null PROJECT in LibNamesAndPaths" );
|
||||
|
||||
@ -464,7 +465,7 @@ void PART_LIBS::LibNamesAndPaths( PROJECT* aProject, bool doSave,
|
||||
}
|
||||
|
||||
|
||||
const wxString PART_LIBS::CacheName( const wxString& aFullProjectFilename )
|
||||
const wxString SYMBOL_LIBS::CacheName( const wxString& aFullProjectFilename )
|
||||
{
|
||||
wxFileName name = aFullProjectFilename;
|
||||
|
||||
@ -478,7 +479,7 @@ const wxString PART_LIBS::CacheName( const wxString& aFullProjectFilename )
|
||||
}
|
||||
|
||||
|
||||
void PART_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
|
||||
void SYMBOL_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
|
||||
{
|
||||
wxString filename;
|
||||
wxString libs_not_found;
|
||||
@ -566,7 +567,7 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress )
|
||||
|
||||
// add the special cache library.
|
||||
wxString cache_name = CacheName( aProject->GetProjectFullName() );
|
||||
PART_LIB* cache_lib;
|
||||
SYMBOL_LIB* cache_lib;
|
||||
|
||||
if( !aProject->IsNullProject() && !cache_name.IsEmpty() )
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
/**
|
||||
* @file class_library.h
|
||||
* @brief Definition for part library class.
|
||||
* @brief Definition for symbol library class.
|
||||
*/
|
||||
|
||||
#ifndef CLASS_LIBRARY_H
|
||||
@ -50,12 +50,12 @@ class SCH_PLUGIN;
|
||||
#define DOC_EXT "dcm"
|
||||
|
||||
/*
|
||||
* Part Library version and file header macros.
|
||||
* Symbol Library version and file header macros.
|
||||
*/
|
||||
#define LIB_VERSION_MAJOR 2
|
||||
#define LIB_VERSION_MINOR 4
|
||||
|
||||
/* Must be the first line of part library (.lib) files. */
|
||||
/* Must be the first line of symbol library (.lib) files. */
|
||||
#define LIBFILE_IDENT "EESchema-LIBRARY Version"
|
||||
|
||||
#define LIB_VERSION( major, minor ) ( major * 100 + minor )
|
||||
@ -68,7 +68,7 @@ class SCH_PLUGIN;
|
||||
|
||||
/*
|
||||
* Library versions 2.4 and lower use the old separate library (.lib) and
|
||||
* document (.dcm) files. Part libraries after 2.4 merged the library
|
||||
* document (.dcm) files. Symbol libraries after 2.4 merged the library
|
||||
* and document files into a single library file. This macro checks if the
|
||||
* library version supports the old format
|
||||
*/
|
||||
@ -81,14 +81,14 @@ enum class SCH_LIB_TYPE
|
||||
LT_SYMBOL
|
||||
};
|
||||
|
||||
// Helper class to filter a list of libraries, and/or a list of PART_LIB
|
||||
// Helper class to filter a list of libraries, and/or a list of SYMBOL_LIB
|
||||
// in dialogs
|
||||
class SCHLIB_FILTER
|
||||
{
|
||||
public:
|
||||
SCHLIB_FILTER()
|
||||
{
|
||||
m_filterPowerParts = false;
|
||||
m_filterPowerSymbols = false;
|
||||
m_forceLoad = false;
|
||||
}
|
||||
|
||||
@ -122,19 +122,19 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* set the filtering of power parts
|
||||
* Set the filtering of power symbols
|
||||
*/
|
||||
void FilterPowerParts( bool aFilterEnable )
|
||||
void FilterPowerSymbols( bool aFilterEnable )
|
||||
{
|
||||
m_filterPowerParts = aFilterEnable;
|
||||
m_filterPowerSymbols = aFilterEnable;
|
||||
}
|
||||
|
||||
// Accessors
|
||||
|
||||
/**
|
||||
* @return true if the filtering of power parts is on
|
||||
* @return true if the filtering of power symbols is on
|
||||
*/
|
||||
bool GetFilterPowerParts() const { return m_filterPowerParts; }
|
||||
bool GetFilterPowerSymbols() const { return m_filterPowerSymbols; }
|
||||
|
||||
|
||||
/**
|
||||
@ -143,8 +143,8 @@ public:
|
||||
const wxArrayString& GetAllowedLibList() const { return m_allowedLibs; }
|
||||
|
||||
/**
|
||||
* @return the name of the lib to use to load a part, or an a empty string
|
||||
* Useful to load (in lib editor or lib viewer) a part from a given library
|
||||
* @return the name of the lib to use to load a symbol, or an a empty string
|
||||
* Useful to load (in lib editor or lib viewer) a symbol from a given library
|
||||
*/
|
||||
const wxString& GetLibSource() const
|
||||
{
|
||||
@ -159,20 +159,20 @@ public:
|
||||
private:
|
||||
wxArrayString m_allowedLibs; ///< a list of lib names to list some libraries
|
||||
///< if empty: no filter
|
||||
bool m_filterPowerParts; ///< true to filter (show only) power parts
|
||||
bool m_forceLoad; // When true, load a part lib from the lib
|
||||
bool m_filterPowerSymbols; ///< true to filter (show only) power symbols
|
||||
bool m_forceLoad; // When true, load a symbol lib from the lib
|
||||
// which is given in m_allowedLibs[0]
|
||||
};
|
||||
|
||||
|
||||
/* Helpers for creating a list of part libraries. */
|
||||
class PART_LIB;
|
||||
/* Helpers for creating a list of symbol libraries. */
|
||||
class SYMBOL_LIB;
|
||||
class wxRegEx;
|
||||
|
||||
/**
|
||||
* LIB_SYMBOL map sorting.
|
||||
*/
|
||||
struct LibPartMapSort
|
||||
struct LibSymbolMapSort
|
||||
{
|
||||
bool operator() ( const wxString& aItem1, const wxString& aItem2 ) const
|
||||
{
|
||||
@ -180,42 +180,42 @@ struct LibPartMapSort
|
||||
}
|
||||
};
|
||||
|
||||
/// Part map used by part library object.
|
||||
/// Symbol map used by symbol library object.
|
||||
|
||||
typedef std::map< wxString, LIB_SYMBOL*, LibPartMapSort > LIB_SYMBOL_MAP;
|
||||
typedef std::vector< LIB_SYMBOL* > LIB_SYMBOLS;
|
||||
typedef boost::ptr_vector< PART_LIB > PART_LIBS_BASE;
|
||||
typedef std::map< wxString, LIB_SYMBOL*, LibSymbolMapSort > LIB_SYMBOL_MAP;
|
||||
typedef std::vector< LIB_SYMBOL* > LIB_SYMBOLS;
|
||||
typedef boost::ptr_vector< SYMBOL_LIB > SYMBOL_LIBS_BASE;
|
||||
|
||||
|
||||
/**
|
||||
* A collection of #PART_LIB objects.
|
||||
* A collection of #SYMBOL_LIB objects.
|
||||
*
|
||||
* It extends from PROJECT::_ELEM so it can be hung in the PROJECT. It does not use any
|
||||
* UI calls, but rather simply throws an IO_ERROR when there is a problem.
|
||||
*/
|
||||
class PART_LIBS : public PART_LIBS_BASE, public PROJECT::_ELEM
|
||||
class SYMBOL_LIBS : public SYMBOL_LIBS_BASE, public PROJECT::_ELEM
|
||||
{
|
||||
public:
|
||||
KICAD_T Type() override { return PART_LIBS_T; }
|
||||
KICAD_T Type() override { return SYMBOL_LIBS_T; }
|
||||
|
||||
static int s_modify_generation; ///< helper for GetModifyHash()
|
||||
static std::mutex s_generationMutex;
|
||||
|
||||
PART_LIBS()
|
||||
SYMBOL_LIBS()
|
||||
{
|
||||
IncrementModifyGeneration();
|
||||
}
|
||||
|
||||
static void IncrementModifyGeneration()
|
||||
{
|
||||
std::lock_guard<std::mutex> mut( PART_LIBS::s_generationMutex );
|
||||
++PART_LIBS::s_modify_generation;
|
||||
std::lock_guard<std::mutex> mut( SYMBOL_LIBS::s_generationMutex );
|
||||
++SYMBOL_LIBS::s_modify_generation;
|
||||
}
|
||||
|
||||
static int GetModifyGeneration()
|
||||
{
|
||||
std::lock_guard<std::mutex> mut( PART_LIBS::s_generationMutex );
|
||||
return PART_LIBS::s_modify_generation;
|
||||
std::lock_guard<std::mutex> mut( SYMBOL_LIBS::s_generationMutex );
|
||||
return SYMBOL_LIBS::s_modify_generation;
|
||||
}
|
||||
|
||||
/// Return the modification hash for all libraries. The value returned
|
||||
@ -223,22 +223,22 @@ public:
|
||||
int GetModifyHash();
|
||||
|
||||
/**
|
||||
* Allocate and adds a part library to the library list.
|
||||
* Allocate and adds a symbol library to the library list.
|
||||
*
|
||||
* @param aFileName - File name object of part library.
|
||||
* @param aFileName is the file name object of symbol library.
|
||||
* @throw IO_ERROR if there's any problem loading.
|
||||
*/
|
||||
PART_LIB* AddLibrary( const wxString& aFileName );
|
||||
SYMBOL_LIB* AddLibrary( const wxString& aFileName );
|
||||
|
||||
/**
|
||||
* Insert a part library into the library list.
|
||||
* Insert a symbol library into the library list.
|
||||
*
|
||||
* @param aFileName - File name object of part library.
|
||||
* @param aIterator - Iterator to insert library in front of.
|
||||
* @return PART_LIB* - the new PART_LIB, which remains owned by this PART_LIBS container.
|
||||
* @param aFileName is the file name object of symbol library.
|
||||
* @param aIterator is an iterator to insert library in front of.
|
||||
* @return the new SYMBOL_LIB, which remains owned by this SYMBOL_LIBS container.
|
||||
* @throw IO_ERROR if there's any problem loading.
|
||||
*/
|
||||
PART_LIB* AddLibrary( const wxString& aFileName, PART_LIBS::iterator& aIterator );
|
||||
SYMBOL_LIB* AddLibrary( const wxString& aFileName, SYMBOL_LIBS::iterator& aIterator );
|
||||
|
||||
/**
|
||||
* Load all of the project's libraries into this container, which should
|
||||
@ -250,7 +250,7 @@ public:
|
||||
void LoadAllLibraries( PROJECT* aProject, bool aShowProgress=true );
|
||||
|
||||
/**
|
||||
* Save or load the names of the currently configured part libraries (without paths).
|
||||
* Save or load the names of the currently configured symbol libraries (without paths).
|
||||
*/
|
||||
static void LibNamesAndPaths( PROJECT* aProject, bool doSave,
|
||||
wxString* aPaths, wxArrayString* aNames=NULL );
|
||||
@ -259,41 +259,41 @@ public:
|
||||
* Return the name of the cache library after potentially fixing it from
|
||||
* an older naming scheme. That is, the old file is renamed if needed.
|
||||
*
|
||||
* @param aFullProjectFilename - the *.pro filename with absolute path.
|
||||
* @param aFullProjectFilename is the *.pro filename with absolute path.
|
||||
*/
|
||||
static const wxString CacheName( const wxString& aFullProjectFilename );
|
||||
|
||||
/**
|
||||
* Find a part library by \a aName.
|
||||
* Find a symbol library by \a aName.
|
||||
*
|
||||
* @param aName - Library file name without path or extension to find.
|
||||
* @return Part library if found, otherwise NULL.
|
||||
* @param aName is the library file name without path or extension to find.
|
||||
* @return the symbol library if found, otherwise NULL.
|
||||
*/
|
||||
PART_LIB* FindLibrary( const wxString& aName );
|
||||
SYMBOL_LIB* FindLibrary( const wxString& aName );
|
||||
|
||||
PART_LIB* FindLibraryByFullFileName( const wxString& aFullFileName );
|
||||
SYMBOL_LIB* FindLibraryByFullFileName( const wxString& aFullFileName );
|
||||
|
||||
PART_LIB* GetCacheLibrary();
|
||||
SYMBOL_LIB* GetCacheLibrary();
|
||||
|
||||
/**
|
||||
* Return the list of part library file names without path and extension.
|
||||
* Return the list of symbol library file names without path and extension.
|
||||
*
|
||||
* @param aSorted - Sort the list of name if true. Otherwise use the library load order.
|
||||
* @return The list of library names.
|
||||
* @param aSorted sort the list of name if true. Otherwise use the library load order.
|
||||
* @return the list of library names.
|
||||
*/
|
||||
wxArrayString GetLibraryNames( bool aSorted = true );
|
||||
|
||||
/**
|
||||
* Search all libraries in the list for a part.
|
||||
* Search all libraries in the list for a symbol.
|
||||
*
|
||||
* A part object will always be returned. If the entry found
|
||||
* is an alias. The root part will be found and returned.
|
||||
* A symbol object will always be returned. If the entry found
|
||||
* is an alias. The root symbol will be found and returned.
|
||||
*
|
||||
* @param aLibId - The #LIB_ID of the symbol to search for.
|
||||
* @param aLibraryName - Name of the library to search for part.
|
||||
* @return LIB_SYMBOL* - The part object if found, otherwise NULL.
|
||||
* @param aLibId is the #LIB_ID of the symbol to search for.
|
||||
* @param aLibraryName is the name of the library to search for symbol.
|
||||
* @return the symbol object if found, otherwise NULL.
|
||||
*/
|
||||
LIB_SYMBOL* FindLibPart( const LIB_ID& aLibId, const wxString& aLibraryName = wxEmptyString );
|
||||
LIB_SYMBOL* FindLibSymbol( const LIB_ID& aLibId, const wxString& aLibraryName = wxEmptyString );
|
||||
|
||||
/**
|
||||
* Search all libraries in the list for a #LIB_SYMBOL using a case insensitive comparison.
|
||||
@ -304,9 +304,9 @@ public:
|
||||
* the chip name (name of alias in lib) can be broken.
|
||||
* This function can be used to display a list of candidates, in symbol properties dialog.
|
||||
*
|
||||
* @param aEntryName - Name of entries to search for (case insensitive).
|
||||
* @param aLibraryName - Name of the library to search.
|
||||
* @param aCandidates - a std::vector to store candidates
|
||||
* @param aEntryName is the name of entries to search for (case insensitive).
|
||||
* @param aLibraryName is the name of the library to search.
|
||||
* @param aCandidates is a std::vector to store candidates.
|
||||
*/
|
||||
void FindLibraryNearEntries( std::vector<LIB_SYMBOL*>& aCandidates, const wxString& aEntryName,
|
||||
const wxString& aLibraryName = wxEmptyString );
|
||||
@ -321,12 +321,12 @@ public:
|
||||
* @warning This code is obsolete with the exception of the cache library. All other
|
||||
* symbol library I/O is managed by the #SCH_IO_MGR object.
|
||||
*/
|
||||
class PART_LIB
|
||||
class SYMBOL_LIB
|
||||
{
|
||||
public:
|
||||
PART_LIB( SCH_LIB_TYPE aType, const wxString& aFileName,
|
||||
SYMBOL_LIB( SCH_LIB_TYPE aType, const wxString& aFileName,
|
||||
SCH_IO_MGR::SCH_FILE_T aPluginType = SCH_IO_MGR::SCH_LEGACY );
|
||||
~PART_LIB();
|
||||
~SYMBOL_LIB();
|
||||
|
||||
/**
|
||||
* @return a magic number that changes if the library has changed
|
||||
@ -364,26 +364,26 @@ public:
|
||||
/**
|
||||
* Load a string array with the names of all the entries in this library.
|
||||
*
|
||||
* @param aNames - String array to place entry names into.
|
||||
* @param aNames is the array to place entry names into.
|
||||
*/
|
||||
void GetPartNames( wxArrayString& aNames ) const;
|
||||
void GetSymbolNames( wxArrayString& aNames ) const;
|
||||
|
||||
/**
|
||||
* Load a vector with all the entries in this library.
|
||||
*
|
||||
* @param aSymbols is a vector to receive the aliases.
|
||||
*/
|
||||
void GetParts( std::vector<LIB_SYMBOL*>& aSymbols ) const;
|
||||
void GetSymbols( std::vector<LIB_SYMBOL*>& aSymbols ) const;
|
||||
|
||||
/**
|
||||
* Find #LIB_SYMBOL by \a aName.
|
||||
*
|
||||
* @param aName - Name of part, case sensitive.
|
||||
* @return LIB_SYMBOL pointer part if found, else NULL.
|
||||
* @param aName is the name of the symbol, case sensitive.
|
||||
* @return LIB_SYMBOL pointer symbol if found, else NULL.
|
||||
*/
|
||||
LIB_SYMBOL* FindPart( const wxString& aName ) const;
|
||||
LIB_SYMBOL* FindSymbol( const wxString& aName ) const;
|
||||
|
||||
LIB_SYMBOL* FindPart( const LIB_ID& aLibId ) const;
|
||||
LIB_SYMBOL* FindSymbol( const LIB_ID& aLibId ) const;
|
||||
|
||||
/**
|
||||
* Add \a aSymbol entry to library.
|
||||
@ -391,51 +391,52 @@ public:
|
||||
* @note A #LIB_SYMBOL can have an alias list so these alias will be added in library.
|
||||
* and the any existing duplicate aliases will be removed from the library.
|
||||
*
|
||||
* @param aSymbol - Part to add, caller retains ownership, a clone is added.
|
||||
* @param aSymbol is the symbol to add, caller retains ownership, a clone is added.
|
||||
*/
|
||||
void AddPart( LIB_SYMBOL* aSymbol );
|
||||
void AddSymbol( LIB_SYMBOL* aSymbol );
|
||||
|
||||
/**
|
||||
* Safely remove \a aEntry from the library and return the next entry.
|
||||
*
|
||||
* The next entry returned depends on the entry being removed. If the entry being
|
||||
* remove also removes the part, then the next entry from the list is returned.
|
||||
* If the entry being used only removes an alias from a part, then the next alias
|
||||
* of the part is returned.
|
||||
* remove also removes the symbol, then the next entry from the list is returned.
|
||||
* If the entry being used only removes an alias from a symbol, then the next alias
|
||||
* of the symbol is returned.
|
||||
*
|
||||
* @param aEntry - Entry to remove from library.
|
||||
* @param aEntry is the entry to remove from library.
|
||||
* @return The next entry in the library or NULL if the library is empty.
|
||||
*/
|
||||
LIB_SYMBOL* RemovePart( LIB_SYMBOL* aEntry );
|
||||
LIB_SYMBOL* RemoveSymbol( LIB_SYMBOL* aEntry );
|
||||
|
||||
/**
|
||||
* Replace an existing part entry in the library.
|
||||
* Replace an existing symbol entry in the library.
|
||||
*
|
||||
* Note a part can have an alias list,
|
||||
* so these alias will be added in library (and previously existing alias removed)
|
||||
* @param aOldPart - The part to replace.
|
||||
* @param aNewPart - The new part.
|
||||
* @note A symbol can have an alias list so these aliases will be added in library and
|
||||
* previously existing alias removed.
|
||||
*
|
||||
* @param aOldSymbol is the symbol to replace.
|
||||
* @param aNewSymbol is the new symbol.
|
||||
*/
|
||||
LIB_SYMBOL* ReplacePart( LIB_SYMBOL* aOldSymbol, LIB_SYMBOL* aNewSymbol );
|
||||
LIB_SYMBOL* ReplaceSymbol( LIB_SYMBOL* aOldSymbol, LIB_SYMBOL* aNewSymbol );
|
||||
|
||||
/**
|
||||
* Return the file name without path or extension.
|
||||
*
|
||||
* @return Name of library file.
|
||||
* @return the name of library file.
|
||||
*/
|
||||
const wxString GetName() const { return fileName.GetName(); }
|
||||
|
||||
/**
|
||||
* Return the full file library name with path and extension.
|
||||
*
|
||||
* @return wxString - Full library file name with path and extension.
|
||||
* @return the full library file name with path and extension.
|
||||
*/
|
||||
wxString GetFullFileName() const { return fileName.GetFullPath(); }
|
||||
|
||||
/**
|
||||
* Return the logical name of the library.
|
||||
*
|
||||
* @return wxString - The logical name of this library.
|
||||
* @return The logical name of this library.
|
||||
*/
|
||||
const wxString GetLogicalName() const
|
||||
{
|
||||
@ -454,11 +455,11 @@ public:
|
||||
/**
|
||||
* Allocate and load a symbol library file.
|
||||
*
|
||||
* @param aFileName - File name of the part library to load.
|
||||
* @return PART_LIB* - the allocated and loaded PART_LIB, which is owned by the caller.
|
||||
* @param aFileName is the file name of the symbol library to load.
|
||||
* @return SYMBOL_LIB* is the allocated and loaded SYMBOL_LIB, which is owned by the caller.
|
||||
* @throw IO_ERROR if there's any problem loading the library.
|
||||
*/
|
||||
static PART_LIB* LoadLibrary( const wxString& aFileName );
|
||||
static SYMBOL_LIB* LoadLibrary( const wxString& aFileName );
|
||||
|
||||
private:
|
||||
SCH_LIB_TYPE type; ///< Library type indicator.
|
||||
@ -479,7 +480,7 @@ private:
|
||||
/**
|
||||
* Case insensitive library name comparison.
|
||||
*/
|
||||
bool operator==( const PART_LIB& aLibrary, const wxString& aName );
|
||||
bool operator!=( const PART_LIB& aLibrary, const wxString& aName );
|
||||
bool operator==( const SYMBOL_LIB& aLibrary, const wxString& aName );
|
||||
bool operator!=( const SYMBOL_LIB& aLibrary, const wxString& aName );
|
||||
|
||||
#endif // CLASS_LIBRARY_H
|
||||
|
@ -311,7 +311,7 @@ DIALOG_SCH_EDIT_ONE_FIELD::DIALOG_SCH_EDIT_ONE_FIELD( SCH_BASE_FRAME* aParent,
|
||||
|
||||
m_textLabel->SetLabel( m_field->GetName() + ":" );
|
||||
|
||||
// The library symbol may have been removed so using SCH_SYMBOL::GetPartRef() here
|
||||
// The library symbol may have been removed so using SCH_SYMBOL::GetLibSymbolRef() here
|
||||
// could result in a segfault. If the library symbol is no longer available, the
|
||||
// schematic fields can still edit so set the power symbol flag to false. This may not
|
||||
// be entirely accurate if the power library is missing but it's better then a segfault.
|
||||
|
@ -326,7 +326,7 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem( const SCH_SHEET_PATH& aShe
|
||||
{
|
||||
if( aItem->Type() == SCH_SYMBOL_T )
|
||||
{
|
||||
bool isPower = static_cast<SCH_SYMBOL*>( aItem )->GetPartRef()->IsPower();
|
||||
bool isPower = static_cast<SCH_SYMBOL*>( aItem )->GetLibSymbolRef()->IsPower();
|
||||
|
||||
if( isPower != ( m_typeFilter->GetSelection() == 1 ) )
|
||||
return;
|
||||
|
@ -196,11 +196,11 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow()
|
||||
m_Parent->GetLibManager().GetRootSymbolNames( libName, rootSymbolNames );
|
||||
m_inheritanceSelectCombo->Append( rootSymbolNames );
|
||||
|
||||
PART_SPTR rootPart = m_libEntry->GetParent().lock();
|
||||
LIB_SYMBOL_SPTR rootSymbol = m_libEntry->GetParent().lock();
|
||||
|
||||
wxCHECK( rootPart, false );
|
||||
wxCHECK( rootSymbol, false );
|
||||
|
||||
wxString parentName = rootPart->GetName();
|
||||
wxString parentName = rootSymbol->GetName();
|
||||
int selection = m_inheritanceSelectCombo->FindString( parentName );
|
||||
|
||||
wxCHECK( selection != wxNOT_FOUND, false );
|
||||
@ -307,7 +307,7 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow()
|
||||
{
|
||||
wxString libName = m_Parent->GetCurLib();
|
||||
|
||||
if( m_Parent->GetLibManager().PartExists( newName, libName ) )
|
||||
if( m_Parent->GetLibManager().SymbolExists( newName, libName ) )
|
||||
{
|
||||
wxString msg;
|
||||
|
||||
|
@ -347,7 +347,7 @@ void DIALOG_PIN_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
|
||||
dc.SetUserScale( scale, scale );
|
||||
GRResetPenAndBrush( &dc );
|
||||
|
||||
PART_DRAW_OPTIONS opts;
|
||||
LIB_SYMBOL_OPTIONS opts;
|
||||
opts.draw_hidden_fields = true;
|
||||
opts.show_connect_point = true;
|
||||
|
||||
|
@ -282,9 +282,9 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
||||
m_dataModel( nullptr )
|
||||
{
|
||||
m_symbol = aSymbol;
|
||||
m_part = m_symbol->GetPartRef().get();
|
||||
m_part = m_symbol->GetLibSymbolRef().get();
|
||||
|
||||
// GetPartRef() now points to the cached part in the schematic, which should always be
|
||||
// GetLibSymbolRef() now points to the cached part in the schematic, which should always be
|
||||
// there for usual cases, but can be null when opening old schematics not storing the part
|
||||
// so we need to handle m_part == nullptr
|
||||
wxASSERT( m_part );
|
||||
|
@ -130,10 +130,10 @@ void DIALOG_SYMBOL_REMAP::OnRemapSymbols( wxCommandEvent& aEvent )
|
||||
wxString paths;
|
||||
wxArrayString libNames;
|
||||
|
||||
PART_LIBS::LibNamesAndPaths( &Prj(), true, &paths, &libNames );
|
||||
SYMBOL_LIBS::LibNamesAndPaths( &Prj(), true, &paths, &libNames );
|
||||
|
||||
// Reload the cache symbol library.
|
||||
Prj().SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL );
|
||||
Prj().SetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS, NULL );
|
||||
Prj().SchLibs();
|
||||
|
||||
Raise();
|
||||
@ -141,11 +141,11 @@ void DIALOG_SYMBOL_REMAP::OnRemapSymbols( wxCommandEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
size_t DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable( std::vector< PART_LIB* >& aLibs )
|
||||
size_t DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable( std::vector< SYMBOL_LIB* >& aLibs )
|
||||
{
|
||||
PART_LIBS* libs = Prj().SchLibs();
|
||||
SYMBOL_LIBS* libs = Prj().SchLibs();
|
||||
|
||||
for( PART_LIBS_BASE::iterator it = libs->begin(); it != libs->end(); ++it )
|
||||
for( SYMBOL_LIBS_BASE::iterator it = libs->begin(); it != libs->end(); ++it )
|
||||
{
|
||||
// Ignore the cache library.
|
||||
if( it->IsCache() )
|
||||
@ -165,7 +165,7 @@ size_t DIALOG_SYMBOL_REMAP::getLibsNotInGlobalSymbolLibTable( std::vector< PART_
|
||||
void DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable( REPORTER& aReporter )
|
||||
{
|
||||
wxString msg;
|
||||
std::vector< PART_LIB* > libs;
|
||||
std::vector< SYMBOL_LIB* > libs;
|
||||
|
||||
if( getLibsNotInGlobalSymbolLibTable( libs ) )
|
||||
{
|
||||
@ -288,15 +288,15 @@ bool DIALOG_SYMBOL_REMAP::remapSymbolToLibTable( SCH_SYMBOL* aSymbol )
|
||||
wxCHECK_MSG( !aSymbol->GetLibId().GetLibItemName().empty(), false,
|
||||
"The symbol LIB_ID name is empty." );
|
||||
|
||||
PART_LIBS* libs = Prj().SchLibs();
|
||||
SYMBOL_LIBS* libs = Prj().SchLibs();
|
||||
|
||||
for( PART_LIBS_BASE::iterator it = libs->begin(); it != libs->end(); ++it )
|
||||
for( SYMBOL_LIBS_BASE::iterator it = libs->begin(); it != libs->end(); ++it )
|
||||
{
|
||||
// Ignore the cache library.
|
||||
if( it->IsCache() )
|
||||
continue;
|
||||
|
||||
LIB_SYMBOL* alias = it->FindPart( aSymbol->GetLibId().GetLibItemName().wx_str() );
|
||||
LIB_SYMBOL* alias = it->FindSymbol( aSymbol->GetLibId().GetLibItemName().wx_str() );
|
||||
|
||||
// Found in the same library as the old look up method assuming the user didn't
|
||||
// change the libraries or library ordering since the last time the schematic was
|
||||
|
@ -29,7 +29,7 @@
|
||||
#define _DIALOG_SYMBOL_REMAP_H_
|
||||
|
||||
|
||||
class PART_LIB;
|
||||
class SYMBOL_LIB;
|
||||
class SCH_SYMBOL;
|
||||
class REPORTER;
|
||||
|
||||
@ -59,7 +59,7 @@ private:
|
||||
* list.
|
||||
* @return the number of libraries found.
|
||||
*/
|
||||
size_t getLibsNotInGlobalSymbolLibTable( std::vector< PART_LIB* >& aLibs );
|
||||
size_t getLibsNotInGlobalSymbolLibTable( std::vector< SYMBOL_LIB* >& aLibs );
|
||||
|
||||
void createProjectSymbolLibTable( REPORTER& aReporter );
|
||||
|
||||
|
@ -57,13 +57,13 @@ enum id_eeschema_frm
|
||||
ID_IMPORT_NON_KICAD_SCH = ID_END_LIST,
|
||||
|
||||
/* Library editor horizontal toolbar IDs. */
|
||||
ID_LIBEDIT_SELECT_PART_NUMBER,
|
||||
ID_LIBEDIT_SELECT_UNIT_NUMBER,
|
||||
|
||||
/* Library viewer horizontal toolbar IDs */
|
||||
ID_LIBVIEW_SELECT_PART,
|
||||
ID_LIBVIEW_NEXT,
|
||||
ID_LIBVIEW_PREVIOUS,
|
||||
ID_LIBVIEW_SELECT_PART_NUMBER,
|
||||
ID_LIBVIEW_SELECT_UNIT_NUMBER,
|
||||
ID_LIBVIEW_LIB_LIST,
|
||||
ID_LIBVIEW_SYM_LIST,
|
||||
|
||||
|
@ -690,7 +690,7 @@ int ERC_TESTER::TestLibSymbolIssues()
|
||||
|
||||
wxCHECK2( symbol, continue );
|
||||
|
||||
LIB_SYMBOL* libSymbolInSchematic = symbol->GetPartRef().get();
|
||||
LIB_SYMBOL* libSymbolInSchematic = symbol->GetLibSymbolRef().get();
|
||||
|
||||
wxCHECK2( libSymbolInSchematic, continue );
|
||||
|
||||
|
@ -344,21 +344,21 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
{
|
||||
// Don't reload the symbol libraries if we are just launching Eeschema from KiCad again.
|
||||
// They are already saved in the kiface project object.
|
||||
if( differentProject || !Prj().GetElem( PROJECT::ELEM_SCH_PART_LIBS ) )
|
||||
if( differentProject || !Prj().GetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS ) )
|
||||
{
|
||||
// load the libraries here, not in SCH_SCREEN::Draw() which is a context
|
||||
// that will not tolerate DisplayError() dialog since we're already in an
|
||||
// event handler in there.
|
||||
// And when a schematic file is loaded, we need these libs to initialize
|
||||
// some parameters (links to PART LIB, dangling ends ...)
|
||||
Prj().SetElem( PROJECT::ELEM_SCH_PART_LIBS, nullptr );
|
||||
Prj().SetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS, nullptr );
|
||||
Prj().SchLibs();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// No legacy symbol libraries including the cache are loaded with the new file format.
|
||||
Prj().SetElem( PROJECT::ELEM_SCH_PART_LIBS, nullptr );
|
||||
Prj().SetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS, nullptr );
|
||||
}
|
||||
|
||||
// Load the symbol library table, this will be used forever more.
|
||||
@ -475,7 +475,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
wxString paths;
|
||||
wxArrayString libNames;
|
||||
|
||||
PART_LIBS::LibNamesAndPaths( &Prj(), false, &paths, &libNames );
|
||||
SYMBOL_LIBS::LibNamesAndPaths( &Prj(), false, &paths, &libNames );
|
||||
|
||||
if( !libNames.IsEmpty() )
|
||||
{
|
||||
@ -499,7 +499,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
|
||||
libNames.Clear();
|
||||
paths.Clear();
|
||||
PART_LIBS::LibNamesAndPaths( &Prj(), true, &paths, &libNames );
|
||||
SYMBOL_LIBS::LibNamesAndPaths( &Prj(), true, &paths, &libNames );
|
||||
}
|
||||
|
||||
if( !cfg || !cfg->m_RescueNeverShow )
|
||||
@ -510,7 +510,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||
}
|
||||
|
||||
// Ensure there is only one legacy library loaded and that it is the cache library.
|
||||
PART_LIBS* legacyLibs = Schematic().Prj().SchLibs();
|
||||
SYMBOL_LIBS* legacyLibs = Schematic().Prj().SchLibs();
|
||||
|
||||
if( legacyLibs->GetLibraryCount() == 0 )
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ PICKED_SYMBOL SCH_BASE_FRAME::PickSymbolFromLibTree( const SCHLIB_FILTER* aFilte
|
||||
|
||||
adapter->AssignIntrinsicRanks();
|
||||
|
||||
if( aFilter->GetFilterPowerParts() )
|
||||
if( aFilter->GetFilterPowerSymbols() )
|
||||
adapter->SetFilter( SYMBOL_TREE_MODEL_ADAPTER::SYM_FILTER_POWER );
|
||||
}
|
||||
|
||||
@ -131,7 +131,8 @@ PICKED_SYMBOL SCH_BASE_FRAME::PickSymbolFromLibTree( const SCHLIB_FILTER* aFilte
|
||||
history_list.push_back( symbol );
|
||||
}
|
||||
|
||||
adapter->DoAddLibrary( "-- " + _( "Recently Used" ) + " --", wxEmptyString, history_list, true );
|
||||
adapter->DoAddLibrary( "-- " + _( "Recently Used" ) + " --", wxEmptyString, history_list,
|
||||
true );
|
||||
|
||||
if( !aHistoryList.empty() )
|
||||
adapter->SetPreselectNode( aHistoryList[0].LibId, aHistoryList[0].Unit );
|
||||
@ -235,14 +236,14 @@ void SCH_EDIT_FRAME::SelectUnit( SCH_SYMBOL* aSymbol, int aUnit )
|
||||
|
||||
void SCH_EDIT_FRAME::ConvertPart( SCH_SYMBOL* aSymbol )
|
||||
{
|
||||
if( !aSymbol || !aSymbol->GetPartRef() )
|
||||
if( !aSymbol || !aSymbol->GetLibSymbolRef() )
|
||||
return;
|
||||
|
||||
wxString msg;
|
||||
|
||||
if( !aSymbol->GetPartRef()->HasConversion() )
|
||||
if( !aSymbol->GetLibSymbolRef()->HasConversion() )
|
||||
{
|
||||
LIB_ID id = aSymbol->GetPartRef()->GetLibId();
|
||||
LIB_ID id = aSymbol->GetLibSymbolRef()->GetLibId();
|
||||
|
||||
msg.Printf( _( "No alternate body style found for symbol \"%s\" in library \"%s\"." ),
|
||||
id.GetLibItemName().wx_str(), id.GetLibNickname().wx_str() );
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
class wxFrame;
|
||||
class wxDialog;
|
||||
class PART_LIBS;
|
||||
class SYMBOL_LIBS;
|
||||
class SCH_SYMBOL;
|
||||
class SCH_TEXT;
|
||||
class SCH_SHEET_PATH;
|
||||
|
@ -180,7 +180,7 @@ wxString LIB_PIN::GetShownName() const
|
||||
void LIB_PIN::print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset, void* aData,
|
||||
const TRANSFORM& aTransform )
|
||||
{
|
||||
PART_DRAW_OPTIONS* opts = (PART_DRAW_OPTIONS*) aData;
|
||||
LIB_SYMBOL_OPTIONS* opts = (LIB_SYMBOL_OPTIONS*) aData;
|
||||
bool drawHiddenFields = opts ? opts->draw_hidden_fields : false;
|
||||
bool showPinType = opts ? opts->show_elec_type : false;
|
||||
bool show_connect_point = opts ? opts->show_connect_point : false;
|
||||
|
@ -79,7 +79,7 @@ struct null_deleter
|
||||
};
|
||||
|
||||
|
||||
LIB_SYMBOL::LIB_SYMBOL( const wxString& aName, LIB_SYMBOL* aParent, PART_LIB* aLibrary ) :
|
||||
LIB_SYMBOL::LIB_SYMBOL( const wxString& aName, LIB_SYMBOL* aParent, SYMBOL_LIB* aLibrary ) :
|
||||
EDA_ITEM( LIB_SYMBOL_T ),
|
||||
m_me( this, null_deleter() ),
|
||||
m_includeInBom( true ),
|
||||
@ -110,7 +110,7 @@ LIB_SYMBOL::LIB_SYMBOL( const wxString& aName, LIB_SYMBOL* aParent, PART_LIB* aL
|
||||
}
|
||||
|
||||
|
||||
LIB_SYMBOL::LIB_SYMBOL( const LIB_SYMBOL& aSymbol, PART_LIB* aLibrary ) :
|
||||
LIB_SYMBOL::LIB_SYMBOL( const LIB_SYMBOL& aSymbol, SYMBOL_LIB* aLibrary ) :
|
||||
EDA_ITEM( aSymbol ),
|
||||
m_me( this, null_deleter() )
|
||||
{
|
||||
@ -152,7 +152,7 @@ LIB_SYMBOL::LIB_SYMBOL( const LIB_SYMBOL& aSymbol, PART_LIB* aLibrary ) :
|
||||
}
|
||||
}
|
||||
|
||||
PART_SPTR parent = aSymbol.m_parent.lock();
|
||||
LIB_SYMBOL_SPTR parent = aSymbol.m_parent.lock();
|
||||
|
||||
if( parent )
|
||||
SetParent( parent.get() );
|
||||
@ -201,7 +201,7 @@ const LIB_SYMBOL& LIB_SYMBOL::operator=( const LIB_SYMBOL& aSymbol )
|
||||
|
||||
m_drawings.sort();
|
||||
|
||||
PART_SPTR parent = aSymbol.m_parent.lock();
|
||||
LIB_SYMBOL_SPTR parent = aSymbol.m_parent.lock();
|
||||
|
||||
if( parent )
|
||||
SetParent( parent.get() );
|
||||
@ -337,7 +337,7 @@ std::unique_ptr< LIB_SYMBOL > LIB_SYMBOL::Flatten() const
|
||||
|
||||
if( IsAlias() )
|
||||
{
|
||||
PART_SPTR parent = m_parent.lock();
|
||||
LIB_SYMBOL_SPTR parent = m_parent.lock();
|
||||
|
||||
wxCHECK_MSG( parent, retv,
|
||||
wxString::Format( "Parent of derived symbol '%s' undefined", m_name ) );
|
||||
@ -410,7 +410,7 @@ const wxString LIB_SYMBOL::GetLibraryName() const
|
||||
|
||||
bool LIB_SYMBOL::IsPower() const
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
return parent->m_options == ENTRY_POWER;
|
||||
|
||||
return m_options == ENTRY_POWER;
|
||||
@ -419,7 +419,7 @@ bool LIB_SYMBOL::IsPower() const
|
||||
|
||||
void LIB_SYMBOL::SetPower()
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
parent->m_options = ENTRY_POWER;
|
||||
|
||||
m_options = ENTRY_POWER;
|
||||
@ -428,7 +428,7 @@ void LIB_SYMBOL::SetPower()
|
||||
|
||||
bool LIB_SYMBOL::IsNormal() const
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
return parent->m_options == ENTRY_NORMAL;
|
||||
|
||||
return m_options == ENTRY_NORMAL;
|
||||
@ -437,7 +437,7 @@ bool LIB_SYMBOL::IsNormal() const
|
||||
|
||||
void LIB_SYMBOL::SetNormal()
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
parent->m_options = ENTRY_NORMAL;
|
||||
|
||||
m_options = ENTRY_NORMAL;
|
||||
@ -477,7 +477,7 @@ wxString LIB_SYMBOL::SubReference( int aUnit, bool aAddSeparator )
|
||||
|
||||
|
||||
void LIB_SYMBOL::Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
|
||||
int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts )
|
||||
int aMulti, int aConvert, const LIB_SYMBOL_OPTIONS& aOpts )
|
||||
{
|
||||
/* draw background for filled items using background option
|
||||
* Solid lines will be drawn after the background
|
||||
@ -701,7 +701,7 @@ void LIB_SYMBOL::GetPins( LIB_PINS& aList, int aUnit, int aConvert ) const
|
||||
* when m_convert == 0, the body item is common to shapes
|
||||
*/
|
||||
|
||||
PART_SPTR parent = m_parent.lock();
|
||||
LIB_SYMBOL_SPTR parent = m_parent.lock();
|
||||
const LIB_ITEMS_CONTAINER& drawItems = parent ? parent->m_drawings : m_drawings;
|
||||
|
||||
for( const LIB_ITEM& item : drawItems[LIB_PIN_T] )
|
||||
@ -1029,7 +1029,7 @@ bool LIB_SYMBOL::HasConversion() const
|
||||
return true;
|
||||
}
|
||||
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
{
|
||||
for( const LIB_ITEM& item : parent->GetDrawItems() )
|
||||
{
|
||||
@ -1164,7 +1164,7 @@ void LIB_SYMBOL::SetUnitCount( int aCount, bool aDuplicateDrawItems )
|
||||
|
||||
int LIB_SYMBOL::GetUnitCount() const
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
return parent->GetUnitCount();
|
||||
|
||||
return m_unitCount;
|
||||
@ -1253,9 +1253,9 @@ std::vector<LIB_ITEM*> LIB_SYMBOL::GetUnitItems( int aUnit, int aConvert )
|
||||
}
|
||||
|
||||
|
||||
std::vector<struct PART_UNITS> LIB_SYMBOL::GetUnitDrawItems()
|
||||
std::vector<struct LIB_SYMBOL_UNITS> LIB_SYMBOL::GetUnitDrawItems()
|
||||
{
|
||||
std::vector<struct PART_UNITS> units;
|
||||
std::vector<struct LIB_SYMBOL_UNITS> units;
|
||||
|
||||
for( LIB_ITEM& item : m_drawings )
|
||||
{
|
||||
@ -1272,7 +1272,7 @@ std::vector<struct PART_UNITS> LIB_SYMBOL::GetUnitDrawItems()
|
||||
|
||||
if( it == units.end() )
|
||||
{
|
||||
struct PART_UNITS newUnit;
|
||||
struct LIB_SYMBOL_UNITS newUnit;
|
||||
newUnit.m_unit = item.GetUnit();
|
||||
newUnit.m_convert = item.GetConvert();
|
||||
newUnit.m_items.push_back( &item );
|
||||
@ -1288,14 +1288,14 @@ std::vector<struct PART_UNITS> LIB_SYMBOL::GetUnitDrawItems()
|
||||
}
|
||||
|
||||
|
||||
std::vector<struct PART_UNITS> LIB_SYMBOL::GetUniqueUnits()
|
||||
std::vector<struct LIB_SYMBOL_UNITS> LIB_SYMBOL::GetUniqueUnits()
|
||||
{
|
||||
int unitNum;
|
||||
size_t i;
|
||||
struct PART_UNITS unit;
|
||||
struct LIB_SYMBOL_UNITS unit;
|
||||
std::vector<LIB_ITEM*> compareDrawItems;
|
||||
std::vector<LIB_ITEM*> currentDrawItems;
|
||||
std::vector<struct PART_UNITS> uniqueUnits;
|
||||
std::vector<struct LIB_SYMBOL_UNITS> uniqueUnits;
|
||||
|
||||
// The first unit is guaranteed to be unique so always include it.
|
||||
unit.m_unit = 1;
|
||||
|
@ -36,14 +36,14 @@
|
||||
class EDA_RECT;
|
||||
class LINE_READER;
|
||||
class OUTPUTFORMATTER;
|
||||
class PART_LIB;
|
||||
class SYMBOL_LIB;
|
||||
class LIB_SYMBOL;
|
||||
class LIB_FIELD;
|
||||
class TEST_LIB_SYMBOL_FIXTURE;
|
||||
|
||||
|
||||
typedef std::shared_ptr<LIB_SYMBOL> PART_SPTR; ///< shared pointer to LIB_SYMBOL
|
||||
typedef std::weak_ptr<LIB_SYMBOL> PART_REF; ///< weak pointer to LIB_SYMBOL
|
||||
typedef std::shared_ptr<LIB_SYMBOL> LIB_SYMBOL_SPTR; ///< shared pointer to LIB_SYMBOL
|
||||
typedef std::weak_ptr<LIB_SYMBOL> LIB_SYMBOL_REF; ///< weak pointer to LIB_SYMBOL
|
||||
typedef MULTIVECTOR<LIB_ITEM, LIB_ARC_T, LIB_FIELD_T> LIB_ITEMS_CONTAINER;
|
||||
typedef LIB_ITEMS_CONTAINER::ITEM_PTR_VECTOR LIB_ITEMS;
|
||||
|
||||
@ -59,7 +59,7 @@ enum LIBRENTRYOPTIONS
|
||||
extern bool operator<( const LIB_SYMBOL& aItem1, const LIB_SYMBOL& aItem2 );
|
||||
|
||||
|
||||
struct PART_DRAW_OPTIONS
|
||||
struct LIB_SYMBOL_OPTIONS
|
||||
{
|
||||
TRANSFORM transform; // Coordinate adjustment settings
|
||||
bool draw_visible_fields; // Whether to draw "visible" fields
|
||||
@ -68,7 +68,7 @@ struct PART_DRAW_OPTIONS
|
||||
bool show_connect_point; // Whether to show the pin connect point marker (small circle)
|
||||
// useful in dialog pin properties
|
||||
|
||||
PART_DRAW_OPTIONS()
|
||||
LIB_SYMBOL_OPTIONS()
|
||||
{
|
||||
transform = DefaultTransform;
|
||||
draw_visible_fields = true;
|
||||
@ -79,7 +79,7 @@ struct PART_DRAW_OPTIONS
|
||||
};
|
||||
|
||||
|
||||
struct PART_UNITS
|
||||
struct LIB_SYMBOL_UNITS
|
||||
{
|
||||
int m_unit; ///< The unit number.
|
||||
int m_convert; ///< The alternate body style of the unit.
|
||||
@ -97,14 +97,14 @@ class LIB_SYMBOL : public EDA_ITEM, public LIB_TREE_ITEM
|
||||
{
|
||||
public:
|
||||
LIB_SYMBOL( const wxString& aName, LIB_SYMBOL* aParent = nullptr,
|
||||
PART_LIB* aLibrary = nullptr );
|
||||
SYMBOL_LIB* aLibrary = nullptr );
|
||||
|
||||
LIB_SYMBOL( const LIB_SYMBOL& aSymbol, PART_LIB* aLibrary = NULL );
|
||||
LIB_SYMBOL( const LIB_SYMBOL& aSymbol, SYMBOL_LIB* aLibrary = NULL );
|
||||
|
||||
virtual ~LIB_SYMBOL();
|
||||
|
||||
///< http://www.boost.org/doc/libs/1_55_0/libs/smart_ptr/sp_techniques.html#weak_without_shared
|
||||
PART_SPTR SharedPtr() const { return m_me; }
|
||||
LIB_SYMBOL_SPTR SharedPtr() const { return m_me; }
|
||||
|
||||
/**
|
||||
* Create a copy of a LIB_SYMBOL and assigns unique KIIDs to the copy and its children.
|
||||
@ -121,8 +121,8 @@ public:
|
||||
}
|
||||
|
||||
void SetParent( LIB_SYMBOL* aParent = nullptr );
|
||||
PART_REF& GetParent() { return m_parent; }
|
||||
const PART_REF& GetParent() const { return m_parent; }
|
||||
LIB_SYMBOL_REF& GetParent() { return m_parent; }
|
||||
const LIB_SYMBOL_REF& GetParent() const { return m_parent; }
|
||||
|
||||
virtual wxString GetClass() const override
|
||||
{
|
||||
@ -143,7 +143,7 @@ public:
|
||||
{
|
||||
if( m_description.IsEmpty() && IsAlias() )
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
return parent->GetDescription();
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ public:
|
||||
{
|
||||
if( m_keyWords.IsEmpty() && IsAlias() )
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
return parent->GetKeyWords();
|
||||
}
|
||||
|
||||
@ -173,8 +173,8 @@ public:
|
||||
|
||||
const wxString GetLibraryName() const;
|
||||
|
||||
PART_LIB* GetLib() const { return m_library; }
|
||||
void SetLib( PART_LIB* aLibrary ) { m_library = aLibrary; }
|
||||
SYMBOL_LIB* GetLib() const { return m_library; }
|
||||
void SetLib( SYMBOL_LIB* aLibrary ) { m_library = aLibrary; }
|
||||
|
||||
timestamp_t GetLastModDate() const { return m_lastModDate; }
|
||||
|
||||
@ -184,7 +184,7 @@ public:
|
||||
{
|
||||
if( m_fpFilters.IsEmpty() && IsAlias() )
|
||||
{
|
||||
if( PART_SPTR parent = m_parent.lock() )
|
||||
if( LIB_SYMBOL_SPTR parent = m_parent.lock() )
|
||||
return parent->GetFPFilters();
|
||||
}
|
||||
|
||||
@ -301,7 +301,7 @@ public:
|
||||
* @param aOpts - Drawing options
|
||||
*/
|
||||
void Print( const RENDER_SETTINGS* aSettings, const wxPoint& aOffset,
|
||||
int aMulti, int aConvert, const PART_DRAW_OPTIONS& aOpts );
|
||||
int aMulti, int aConvert, const LIB_SYMBOL_OPTIONS& aOpts );
|
||||
|
||||
/**
|
||||
* Plot lib symbol to plotter.
|
||||
@ -624,7 +624,7 @@ public:
|
||||
* @note This does not include LIB_FIELD objects since they are not associated with
|
||||
* unit and/or convert numbers.
|
||||
*/
|
||||
std::vector<struct PART_UNITS> GetUnitDrawItems();
|
||||
std::vector<struct LIB_SYMBOL_UNITS> GetUnitDrawItems();
|
||||
|
||||
/**
|
||||
* Return a list of unit numbers that are unique to this symbol.
|
||||
@ -634,7 +634,7 @@ public:
|
||||
*
|
||||
* @return a list of unique unit numbers and their associated draw items.
|
||||
*/
|
||||
std::vector<struct PART_UNITS> GetUniqueUnits();
|
||||
std::vector<struct LIB_SYMBOL_UNITS> GetUniqueUnits();
|
||||
|
||||
/**
|
||||
* Return a list of item pointers for \a aUnit and \a aConvert for this symbol.
|
||||
@ -659,8 +659,8 @@ private:
|
||||
void deleteAllFields();
|
||||
|
||||
private:
|
||||
PART_SPTR m_me;
|
||||
PART_REF m_parent; ///< Use for inherited symbols.
|
||||
LIB_SYMBOL_SPTR m_me;
|
||||
LIB_SYMBOL_REF m_parent; ///< Use for inherited symbols.
|
||||
LIB_ID m_libId;
|
||||
timestamp_t m_lastModDate;
|
||||
|
||||
@ -679,7 +679,7 @@ private:
|
||||
|
||||
LIB_ITEMS_CONTAINER m_drawings;
|
||||
|
||||
PART_LIB* m_library;
|
||||
SYMBOL_LIB* m_library;
|
||||
wxString m_name;
|
||||
wxString m_description;
|
||||
wxString m_keyWords; ///< Search keywords
|
||||
|
@ -69,7 +69,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
|
||||
SCH_SCREENS screens( Schematic().Root() );
|
||||
|
||||
// Create a new empty library to archive symbols:
|
||||
std::unique_ptr<PART_LIB> archLib = std::make_unique<PART_LIB>( SCH_LIB_TYPE::LT_EESCHEMA,
|
||||
std::unique_ptr<SYMBOL_LIB> archLib = std::make_unique<SYMBOL_LIB>( SCH_LIB_TYPE::LT_EESCHEMA,
|
||||
aFileName );
|
||||
|
||||
// Save symbols to file only when the library will be fully filled
|
||||
@ -90,7 +90,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
|
||||
|
||||
try
|
||||
{
|
||||
if( archLib->FindPart( symbol->GetLibId() ) )
|
||||
if( archLib->FindSymbol( symbol->GetLibId() ) )
|
||||
continue;
|
||||
|
||||
libSymbol = GetLibPart( symbol->GetLibId(), true );
|
||||
@ -116,8 +116,8 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
|
||||
// Use the full LIB_ID as the symbol name to prevent symbol name collisions.
|
||||
flattenedSymbol->SetName( symbol->GetLibId().GetUniStringLibId() );
|
||||
|
||||
// AddPart() does first clone the symbol before adding.
|
||||
archLib->AddPart( flattenedSymbol.get() );
|
||||
// AddSymbol() does first clone the symbol before adding.
|
||||
archLib->AddSymbol( flattenedSymbol.get() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 1992-2017 jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2013-2017 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.TXT for contributors.
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -92,11 +92,11 @@ SCH_SYMBOL* NETLIST_EXPORTER_BASE::findNextSymbol( EDA_ITEM* aItem, SCH_SHEET_PA
|
||||
// removed because with multiple instances of one schematic (several sheets pointing to
|
||||
// 1 screen), this will be erroneously be toggled.
|
||||
|
||||
if( !symbol->GetPartRef() )
|
||||
if( !symbol->GetLibSymbolRef() )
|
||||
return nullptr;
|
||||
|
||||
// If symbol is a "multi parts per package" type
|
||||
if( symbol->GetPartRef()->GetUnitCount() > 1 )
|
||||
if( symbol->GetLibSymbolRef()->GetUnitCount() > 1 )
|
||||
{
|
||||
// test if this reference has already been processed, and if so skip
|
||||
if( m_referencesAlreadyFound.Lookup( ref ) )
|
||||
@ -104,7 +104,7 @@ SCH_SYMBOL* NETLIST_EXPORTER_BASE::findNextSymbol( EDA_ITEM* aItem, SCH_SHEET_PA
|
||||
}
|
||||
|
||||
// record the usage of this library symbol entry.
|
||||
m_libParts.insert( symbol->GetPartRef().get() ); // rejects non-unique pointers
|
||||
m_libParts.insert( symbol->GetLibSymbolRef().get() ); // rejects non-unique pointers
|
||||
|
||||
return symbol;
|
||||
}
|
||||
@ -135,18 +135,18 @@ void NETLIST_EXPORTER_BASE::CreatePinList( SCH_SYMBOL* aSymbol,
|
||||
// removed because with multiple instances of one schematic (several sheets pointing to
|
||||
// 1 screen), this will be erroneously be toggled.
|
||||
|
||||
if( !aSymbol->GetPartRef() )
|
||||
if( !aSymbol->GetLibSymbolRef() )
|
||||
return;
|
||||
|
||||
m_sortedSymbolPinList.clear();
|
||||
|
||||
// If symbol is a "multi parts per package" type
|
||||
if( aSymbol->GetPartRef()->GetUnitCount() > 1 )
|
||||
if( aSymbol->GetLibSymbolRef()->GetUnitCount() > 1 )
|
||||
{
|
||||
// Collect all pins for this reference designator by searching the entire design for
|
||||
// other parts with the same reference designator.
|
||||
// This is only done once, it would be too expensive otherwise.
|
||||
findAllUnitsOfSymbol( aSymbol, aSymbol->GetPartRef().get(),
|
||||
findAllUnitsOfSymbol( aSymbol, aSymbol->GetLibSymbolRef().get(),
|
||||
aSheetPath, aKeepUnconnectedPins );
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ void NETLIST_EXPORTER_BASE::CreatePinList( SCH_SYMBOL* aSymbol,
|
||||
eraseDuplicatePins();
|
||||
|
||||
// record the usage of this library symbol
|
||||
m_libParts.insert( aSymbol->GetPartRef().get() ); // rejects non-unique pointers
|
||||
m_libParts.insert( aSymbol->GetLibSymbolRef().get() ); // rejects non-unique pointers
|
||||
}
|
||||
|
||||
|
||||
|
@ -79,8 +79,10 @@ bool NETLIST_EXPORTER_ORCADPCB2::WriteNetlist( const wxString& aOutFileName,
|
||||
|
||||
CreatePinList( symbol, &sheet, true );
|
||||
|
||||
if( symbol->GetPartRef() && symbol->GetPartRef()->GetFPFilters().GetCount() != 0 )
|
||||
cmpList.push_back( SCH_REFERENCE( symbol, symbol->GetPartRef().get(), sheet ) );
|
||||
if( symbol->GetLibSymbolRef()
|
||||
&& symbol->GetLibSymbolRef()->GetFPFilters().GetCount() != 0 )
|
||||
cmpList.push_back( SCH_REFERENCE( symbol, symbol->GetLibSymbolRef().get(),
|
||||
sheet ) );
|
||||
|
||||
footprint = symbol->GetFootprint( &sheet, true );
|
||||
footprint.Replace( wxT( " " ), wxT( "_" ) );
|
||||
|
@ -242,8 +242,8 @@ wxString NETLIST_EXPORTER_PSPICE::GetSpiceFieldDefVal( SPICE_FIELD aField, SCH_S
|
||||
wxString nodeSeq;
|
||||
std::vector<LIB_PIN*> pins;
|
||||
|
||||
wxCHECK( aSymbol->GetPartRef(), wxString() );
|
||||
aSymbol->GetPartRef()->GetPins( pins );
|
||||
wxCHECK( aSymbol->GetLibSymbolRef(), wxString() );
|
||||
aSymbol->GetLibSymbolRef()->GetPins( pins );
|
||||
|
||||
for( LIB_PIN* pin : pins )
|
||||
nodeSeq += pin->GetNumber() + " ";
|
||||
|
@ -297,9 +297,9 @@ XNODE* NETLIST_EXPORTER_XML::makeSymbols( unsigned aCtl )
|
||||
// "logical" library name, which is in anticipation of a better search algorithm
|
||||
// for parts based on "logical_lib.part" and where logical_lib is merely the library
|
||||
// name minus path and extension.
|
||||
if( symbol->GetPartRef() )
|
||||
if( symbol->GetLibSymbolRef() )
|
||||
xlibsource->AddAttribute( "lib",
|
||||
symbol->GetPartRef()->GetLibId().GetLibNickname() );
|
||||
symbol->GetLibSymbolRef()->GetLibId().GetLibNickname() );
|
||||
|
||||
// We only want the symbol name, not the full LIB_ID.
|
||||
xlibsource->AddAttribute( "part", symbol->GetLibId().GetLibItemName() );
|
||||
|
@ -83,15 +83,15 @@ static void getSymbols( SCHEMATIC* aSchematic, std::vector<SCH_SYMBOL*>& aSymbol
|
||||
* Search the libraries for the first symbol with a given name.
|
||||
*
|
||||
* @param aName - name to search for
|
||||
* @param aLibs - the loaded PART_LIBS
|
||||
* @param aLibs - the loaded SYMBOL_LIBS
|
||||
* @param aCached - whether we are looking for the cached symbol
|
||||
*/
|
||||
static LIB_SYMBOL* findSymbol( const wxString& aName, PART_LIBS* aLibs, bool aCached )
|
||||
static LIB_SYMBOL* findSymbol( const wxString& aName, SYMBOL_LIBS* aLibs, bool aCached )
|
||||
{
|
||||
LIB_SYMBOL *symbol = NULL;
|
||||
wxString new_name = LIB_ID::FixIllegalChars( aName );
|
||||
|
||||
for( PART_LIB& each_lib : *aLibs )
|
||||
for( SYMBOL_LIB& each_lib : *aLibs )
|
||||
{
|
||||
if( aCached && !each_lib.IsCache() )
|
||||
continue;
|
||||
@ -99,7 +99,7 @@ static LIB_SYMBOL* findSymbol( const wxString& aName, PART_LIBS* aLibs, bool aCa
|
||||
if( !aCached && each_lib.IsCache() )
|
||||
continue;
|
||||
|
||||
symbol = each_lib.FindPart( new_name );
|
||||
symbol = each_lib.FindSymbol( new_name );
|
||||
|
||||
if( symbol )
|
||||
break;
|
||||
@ -161,7 +161,7 @@ void RESCUE_CASE_CANDIDATE::FindRescues( RESCUER& aRescuer,
|
||||
|
||||
LIB_ID id( wxEmptyString, search_name );
|
||||
|
||||
case_sensitive_match = aRescuer.GetPrj()->SchLibs()->FindLibPart( id );
|
||||
case_sensitive_match = aRescuer.GetPrj()->SchLibs()->FindLibSymbol( id );
|
||||
|
||||
// If the case sensitive match failed, try a case insensitive match.
|
||||
if( !case_sensitive_match )
|
||||
@ -320,7 +320,7 @@ bool RESCUE_CACHE_CANDIDATE::PerformAction( RESCUER* aRescuer )
|
||||
|
||||
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
||||
new_symbol->SetName( m_new_name );
|
||||
aRescuer->AddPart( new_symbol.get() );
|
||||
aRescuer->AddSymbol( new_symbol.get() );
|
||||
|
||||
for( SCH_SYMBOL* eachSymbol : *aRescuer->GetSymbols() )
|
||||
{
|
||||
@ -399,7 +399,7 @@ void RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(
|
||||
if( !cache_match && !lib_match )
|
||||
continue;
|
||||
|
||||
PART_SPTR lib_match_parent;
|
||||
LIB_SYMBOL_SPTR lib_match_parent;
|
||||
|
||||
// If it's a derive symbol, use the parent symbol to perform the pin test.
|
||||
if( lib_match && lib_match->IsAlias() )
|
||||
@ -482,7 +482,7 @@ bool RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction( RESCUER* aRescuer )
|
||||
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
||||
new_symbol->SetLibId( m_new_id );
|
||||
new_symbol->SetName( m_new_id.GetLibItemName() );
|
||||
aRescuer->AddPart( new_symbol.get() );
|
||||
aRescuer->AddSymbol( new_symbol.get() );
|
||||
|
||||
for( SCH_SYMBOL* eachSymbol : *aRescuer->GetSymbols() )
|
||||
{
|
||||
@ -645,7 +645,7 @@ void LEGACY_RESCUER::OpenRescueLibrary()
|
||||
{
|
||||
wxFileName fn = GetRescueLibraryFileName( m_schematic );
|
||||
|
||||
std::unique_ptr<PART_LIB> rescue_lib = std::make_unique<PART_LIB>( SCH_LIB_TYPE::LT_EESCHEMA,
|
||||
std::unique_ptr<SYMBOL_LIB> rescue_lib = std::make_unique<SYMBOL_LIB>( SCH_LIB_TYPE::LT_EESCHEMA,
|
||||
fn.GetFullPath() );
|
||||
|
||||
m_rescue_lib = std::move( rescue_lib );
|
||||
@ -653,19 +653,19 @@ void LEGACY_RESCUER::OpenRescueLibrary()
|
||||
|
||||
// If a rescue library already exists copy the contents of that library so we do not
|
||||
// lose an previous rescues.
|
||||
PART_LIB* rescueLib = m_prj->SchLibs()->FindLibrary( fn.GetName() );
|
||||
SYMBOL_LIB* rescueLib = m_prj->SchLibs()->FindLibrary( fn.GetName() );
|
||||
|
||||
if( rescueLib )
|
||||
{
|
||||
// For items in the rescue library, aliases are the root symbol.
|
||||
std::vector< LIB_SYMBOL* > symbols;
|
||||
|
||||
rescueLib->GetParts( symbols );
|
||||
rescueLib->GetSymbols( symbols );
|
||||
|
||||
for( auto symbol : symbols )
|
||||
{
|
||||
// The LIB_SYMBOL copy constructor flattens derived symbols (formerly known as aliases).
|
||||
m_rescue_lib->AddPart( new LIB_SYMBOL( *symbol, m_rescue_lib.get() ) );
|
||||
m_rescue_lib->AddSymbol( new LIB_SYMBOL( *symbol, m_rescue_lib.get() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -691,17 +691,17 @@ bool LEGACY_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||
wxString libPaths;
|
||||
|
||||
wxString libName = m_rescue_lib->GetName();
|
||||
PART_LIBS *libs = dynamic_cast<PART_LIBS*>( m_prj->GetElem( PROJECT::ELEM_SCH_PART_LIBS ) );
|
||||
SYMBOL_LIBS *libs = dynamic_cast<SYMBOL_LIBS*>( m_prj->GetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS ) );
|
||||
|
||||
if( !libs )
|
||||
{
|
||||
libs = new PART_LIBS();
|
||||
m_prj->SetElem( PROJECT::ELEM_SCH_PART_LIBS, libs );
|
||||
libs = new SYMBOL_LIBS();
|
||||
m_prj->SetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS, libs );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
PART_LIBS::LibNamesAndPaths( m_prj, false, &libPaths, &libNames );
|
||||
SYMBOL_LIBS::LibNamesAndPaths( m_prj, false, &libPaths, &libNames );
|
||||
|
||||
// Make sure the library is not already in the list
|
||||
while( libNames.Index( libName ) != wxNOT_FOUND )
|
||||
@ -709,7 +709,7 @@ bool LEGACY_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||
|
||||
// Add the library to the top of the list and save.
|
||||
libNames.Insert( libName, 0 );
|
||||
PART_LIBS::LibNamesAndPaths( m_prj, true, &libPaths, &libNames );
|
||||
SYMBOL_LIBS::LibNamesAndPaths( m_prj, true, &libPaths, &libNames );
|
||||
}
|
||||
catch( const IO_ERROR& )
|
||||
{
|
||||
@ -719,12 +719,12 @@ bool LEGACY_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||
|
||||
// Save the old libraries in case there is a problem after clear(). We'll
|
||||
// put them back in.
|
||||
boost::ptr_vector<PART_LIB> libsSave;
|
||||
boost::ptr_vector<SYMBOL_LIB> libsSave;
|
||||
libsSave.transfer( libsSave.end(), libs->begin(), libs->end(), *libs );
|
||||
|
||||
m_prj->SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL );
|
||||
m_prj->SetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS, NULL );
|
||||
|
||||
libs = new PART_LIBS();
|
||||
libs = new SYMBOL_LIBS();
|
||||
|
||||
try
|
||||
{
|
||||
@ -743,7 +743,7 @@ bool LEGACY_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||
return false;
|
||||
}
|
||||
|
||||
m_prj->SetElem( PROJECT::ELEM_SCH_PART_LIBS, libs );
|
||||
m_prj->SetElem( PROJECT::ELEM_SCH_SYMBOL_LIBS, libs );
|
||||
|
||||
// Update the schematic symbol library links since the library list has changed.
|
||||
SCH_SCREENS schematic( m_schematic->Root() );
|
||||
@ -752,12 +752,12 @@ bool LEGACY_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||
}
|
||||
|
||||
|
||||
void LEGACY_RESCUER::AddPart( LIB_SYMBOL* aNewSymbol )
|
||||
void LEGACY_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
||||
{
|
||||
wxCHECK_RET( aNewSymbol, "Invalid LIB_SYMBOL pointer." );
|
||||
|
||||
aNewSymbol->SetLib( m_rescue_lib.get() );
|
||||
m_rescue_lib->AddPart( aNewSymbol );
|
||||
m_rescue_lib->AddSymbol( aNewSymbol );
|
||||
}
|
||||
|
||||
|
||||
@ -849,7 +849,7 @@ bool SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||
}
|
||||
|
||||
|
||||
void SYMBOL_LIB_TABLE_RESCUER::AddPart( LIB_SYMBOL* aNewSymbol )
|
||||
void SYMBOL_LIB_TABLE_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
||||
{
|
||||
wxCHECK_RET( aNewSymbol, "Invalid LIB_SYMBOL pointer." );
|
||||
|
||||
|
@ -258,7 +258,7 @@ public:
|
||||
*/
|
||||
virtual void FindCandidates() = 0;
|
||||
|
||||
virtual void AddPart( LIB_SYMBOL* aNewSymbol ) = 0;
|
||||
virtual void AddSymbol( LIB_SYMBOL* aNewSymbol ) = 0;
|
||||
|
||||
/**
|
||||
* Display a dialog to allow the user to select rescues.
|
||||
@ -350,10 +350,10 @@ public:
|
||||
|
||||
virtual bool WriteRescueLibrary( wxWindow *aParent ) override;
|
||||
|
||||
virtual void AddPart( LIB_SYMBOL* aNewSymbol ) override;
|
||||
virtual void AddSymbol( LIB_SYMBOL* aNewSymbol ) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<PART_LIB> m_rescue_lib;
|
||||
std::unique_ptr<SYMBOL_LIB> m_rescue_lib;
|
||||
};
|
||||
|
||||
|
||||
@ -376,7 +376,7 @@ public:
|
||||
|
||||
virtual bool WriteRescueLibrary( wxWindow* aParent ) override;
|
||||
|
||||
virtual void AddPart( LIB_SYMBOL* aNewSymbol ) override;
|
||||
virtual void AddSymbol( LIB_SYMBOL* aNewSymbol ) override;
|
||||
|
||||
private:
|
||||
SCH_PLUGIN::SCH_PLUGIN_RELEASER m_pi;
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <tools/ee_selection_tool.h>
|
||||
|
||||
|
||||
LIB_SYMBOL* SchGetLibPart( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable, PART_LIB* aCacheLib,
|
||||
LIB_SYMBOL* SchGetLibPart( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable, SYMBOL_LIB* aCacheLib,
|
||||
wxWindow* aParent, bool aShowErrorMsg )
|
||||
{
|
||||
wxCHECK_MSG( aLibTable, nullptr, "Invalid symbol library table." );
|
||||
@ -60,7 +60,7 @@ LIB_SYMBOL* SchGetLibPart( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable, PA
|
||||
|
||||
wxString cacheName = aLibId.GetLibNickname().wx_str();
|
||||
cacheName += "_" + aLibId.GetLibItemName();
|
||||
symbol = aCacheLib->FindPart( cacheName );
|
||||
symbol = aCacheLib->FindSymbol( cacheName );
|
||||
}
|
||||
}
|
||||
catch( const IO_ERROR& ioe )
|
||||
@ -195,7 +195,7 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
||||
LIB_SYMBOL* SCH_BASE_FRAME::GetLibPart( const LIB_ID& aLibId, bool aUseCacheLib,
|
||||
bool aShowErrorMsg )
|
||||
{
|
||||
PART_LIB* cache = ( aUseCacheLib ) ? Prj().SchLibs()->GetCacheLibrary() : NULL;
|
||||
SYMBOL_LIB* cache = ( aUseCacheLib ) ? Prj().SchLibs()->GetCacheLibrary() : NULL;
|
||||
|
||||
return SchGetLibPart( aLibId, Prj().SchSymbolLibTable(), cache, this, aShowErrorMsg );
|
||||
}
|
||||
@ -231,7 +231,8 @@ bool SCH_BASE_FRAME::saveSymbolLibTables( bool aGlobal, bool aProject )
|
||||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
success = false;
|
||||
msg.Printf( _( "Error saving project-specific symbol library table:\n%s" ), ioe.What() );
|
||||
msg.Printf( _( "Error saving project-specific symbol library table:\n%s" ),
|
||||
ioe.What() );
|
||||
wxMessageBox( msg, _( "File Save Error" ), wxOK | wxICON_ERROR );
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user