Formatting.

This commit is contained in:
Jeff Young 2020-12-12 21:54:47 +00:00
parent 7565f60a03
commit 1db7ffad5e
3 changed files with 16 additions and 10 deletions

View File

@ -178,7 +178,7 @@ bool SYMBOL_LIBRARY_MANAGER::SaveLibrary( const wxString& aLibrary, const wxStri
PROPERTIES properties;
properties.emplace( SCH_LEGACY_PLUGIN::PropBuffering, "" );
for( auto part : getOriginalParts( aLibrary ) )
for( LIB_PART* part : getOriginalParts( aLibrary ) )
{
LIB_PART* newSymbol;

View File

@ -104,8 +104,11 @@ public:
/**
* Updates the SYMBOL_LIBRARY_MANAGER data to synchronize with Symbol Library Table.
*/
void Sync( bool aForce = false, std::function<void(int, int, const wxString&)> aProgressCallback
= [](int, int, const wxString&){} );
void Sync( bool aForce = false,
std::function<void( int, int, const wxString& )> aProgressCallback
= []( int, int, const wxString& )
{
} );
int GetHash() const;
@ -481,7 +484,6 @@ private:
wxString m_currentPart; ///< Currently modified library
wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> m_adapter;
};
#endif /* SYMBOL_LIBRARY_MANAGER_H */

View File

@ -780,7 +780,8 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
if( fileType.m_IsFile )
{
wxFileDialog dlg( this, title, cfg->m_lastFootprintLibDir, wxEmptyString,
fileType.m_FileFilter, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
fileType.m_FileFilter,
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
int result = dlg.ShowModal();
@ -794,7 +795,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
else
{
wxDirDialog dlg( nullptr, title, cfg->m_lastFootprintLibDir,
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
int result = dlg.ShowModal();
@ -817,11 +818,11 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
traverser.GetPaths( failedDirs );
wxString detailedMsg = _( "The following directories could not be opened: \n" );
for( auto& path : failedDirs )
for( const wxString& path : failedDirs )
detailedMsg << path << "\n";
DisplayErrorMessage( this, _( "Failed to open directories to look for libraries" ),
detailedMsg );
detailedMsg );
}
}
else
@ -854,8 +855,11 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
if( !applyToAll )
{
// The cancel button adds the library to the table anyway
addDuplicates = ( OKOrCancelDialog( this, warning, wxString::Format( msg, nickname ),
detailedMsg, _( "Skip" ), _( "Add Anyway" ), &applyToAll ) == wxID_CANCEL );
addDuplicates = ( OKOrCancelDialog( this, warning,
wxString::Format( msg, nickname ),
detailedMsg,
_( "Skip" ), _( "Add Anyway" ),
&applyToAll ) == wxID_CANCEL );
}
doAdd = addDuplicates;