Commit 53e04ce7 authored by Dick Hollenbeck's avatar Dick Hollenbeck

cvpcb was not filtering on the current library when USE_FP_LIB_TABLE.

<%s> being replaced with '%s' because the former in invisible in html panels.
Cure some compiler warnings.
parent 0ca123d2
...@@ -101,8 +101,8 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString& aFootprintLibNames ) ...@@ -101,8 +101,8 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( wxArrayString& aFootprintLibNames )
FOOTPRINT_INFO* fpinfo = new FOOTPRINT_INFO(); FOOTPRINT_INFO* fpinfo = new FOOTPRINT_INFO();
fpinfo->SetLibraryName( filename.GetName() ); fpinfo->SetNickname( filename.GetName() );
fpinfo->SetLibraryPath( filename.GetFullPath() ); fpinfo->SetLibPath( filename.GetFullPath() );
fpinfo->m_Module = fpnames[i]; fpinfo->m_Module = fpnames[i];
fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH ); fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH );
fpinfo->m_KeyWord = m->GetKeywords(); fpinfo->m_KeyWord = m->GetKeywords();
...@@ -168,9 +168,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a ...@@ -168,9 +168,7 @@ bool FOOTPRINT_LIST::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* a
FOOTPRINT_INFO* fpinfo = new FOOTPRINT_INFO(); FOOTPRINT_INFO* fpinfo = new FOOTPRINT_INFO();
fpinfo->SetLibraryName( nickname ); fpinfo->SetNickname( nickname );
//fpinfo->SetLibraryPath( path );
fpinfo->m_Module = fpnames[i]; fpinfo->m_Module = fpnames[i];
fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH ); fpinfo->m_padCount = m->GetPadCount( MODULE::DO_NOT_INCLUDE_NPTH );
...@@ -202,13 +200,13 @@ FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName ) ...@@ -202,13 +200,13 @@ FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName )
FPID fpid; FPID fpid;
wxCHECK_MSG( fpid.Parse( aFootprintName ) < 0, NULL, wxCHECK_MSG( fpid.Parse( aFootprintName ) < 0, NULL,
wxString::Format( wxT( "<%s> is not a valid FPID." ), wxString::Format( wxT( "'%s' is not a valid FPID." ),
GetChars( aFootprintName ) ) ); GetChars( aFootprintName ) ) );
wxString libNickname = FROM_UTF8( fpid.GetLibNickname().c_str() ); wxString libNickname = FROM_UTF8( fpid.GetLibNickname().c_str() );
wxString footprintName = FROM_UTF8( fpid.GetFootprintName().c_str() ); wxString footprintName = FROM_UTF8( fpid.GetFootprintName().c_str() );
if( libNickname == footprint.m_libName && footprintName == footprint.m_Module ) if( libNickname == footprint.m_nickname && footprintName == footprint.m_Module )
return &footprint; return &footprint;
#else #else
if( aFootprintName.CmpNoCase( footprint.m_Module ) == 0 ) if( aFootprintName.CmpNoCase( footprint.m_Module ) == 0 )
...@@ -221,10 +219,14 @@ FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName ) ...@@ -221,10 +219,14 @@ FOOTPRINT_INFO* FOOTPRINT_LIST::GetModuleInfo( const wxString& aFootprintName )
bool FOOTPRINT_INFO::InLibrary( const wxString& aLibrary ) const bool FOOTPRINT_INFO::InLibrary( const wxString& aLibrary ) const
{ {
#if defined( USE_FP_LIB_TABLE )
return aLibrary == m_nickname;
#else
if( aLibrary.IsEmpty() ) if( aLibrary.IsEmpty() )
return false; return false;
if( aLibrary == m_libName || aLibrary == m_libPath ) if( aLibrary == m_nickname || aLibrary == m_lib_path )
return true; return true;
wxFileName filename = aLibrary; wxFileName filename = aLibrary;
...@@ -232,11 +234,12 @@ bool FOOTPRINT_INFO::InLibrary( const wxString& aLibrary ) const ...@@ -232,11 +234,12 @@ bool FOOTPRINT_INFO::InLibrary( const wxString& aLibrary ) const
if( filename.GetExt().IsEmpty() ) if( filename.GetExt().IsEmpty() )
filename.SetExt( LegacyFootprintLibPathExtension ); filename.SetExt( LegacyFootprintLibPathExtension );
if( filename.GetFullPath() == m_libPath ) if( filename.GetFullPath() == m_lib_path )
return true; return true;
if( filename.GetPath().IsEmpty() ) if( filename.GetPath().IsEmpty() )
filename = wxGetApp().FindLibraryPath( filename.GetFullName() ); filename = wxGetApp().FindLibraryPath( filename.GetFullName() );
return filename.GetFullPath() == m_libPath; return filename.GetFullPath() == m_lib_path;
#endif
} }
...@@ -118,6 +118,9 @@ void WORKSHEET_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const ...@@ -118,6 +118,9 @@ void WORKSHEET_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const
case WS_DRAW_ITEM_BASE::wsg_text: case WS_DRAW_ITEM_BASE::wsg_text:
draw( static_cast<const WS_DRAW_ITEM_TEXT*>( item ), aGal ); draw( static_cast<const WS_DRAW_ITEM_TEXT*>( item ), aGal );
break; break;
case WS_DRAW_ITEM_BASE::wsg_bitmap:
break;
} }
item = drawList.GetNext(); item = drawList.GetNext();
......
...@@ -550,19 +550,22 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName ) ...@@ -550,19 +550,22 @@ MODULE* DISPLAY_FOOTPRINTS_FRAME::Get_Module( const wxString& aFootprintName )
void DISPLAY_FOOTPRINTS_FRAME::InitDisplay() void DISPLAY_FOOTPRINTS_FRAME::InitDisplay()
{ {
wxString msg; wxString msg;
CVPCB_MAINFRAME * parentframe = (CVPCB_MAINFRAME *) GetParent();
CVPCB_MAINFRAME* parentframe = (CVPCB_MAINFRAME *) GetParent();
wxString footprintName = parentframe->m_FootprintList->GetSelectedFootprint(); wxString footprintName = parentframe->m_FootprintList->GetSelectedFootprint();
if( !footprintName.IsEmpty() ) if( !footprintName.IsEmpty() )
{ {
msg.Printf( _( "Footprint: %s" ), GetChars( footprintName ) ); msg.Printf( _( "Footprint: %s" ), GetChars( footprintName ) );
SetTitle( msg ); SetTitle( msg );
FOOTPRINT_INFO* module_info = parentframe->m_footprints.GetModuleInfo( footprintName ); FOOTPRINT_INFO* module_info = parentframe->m_footprints.GetModuleInfo( footprintName );
const wxChar *libname; const wxChar *libname;
if( module_info ) if( module_info )
libname = GetChars( module_info->GetLibraryPath() ); libname = GetChars( module_info->GetNickname() );
else else
libname = GetChars( wxT( "???" ) ); libname = GetChars( wxT( "???" ) );
...@@ -582,7 +585,6 @@ void DISPLAY_FOOTPRINTS_FRAME::InitDisplay() ...@@ -582,7 +585,6 @@ void DISPLAY_FOOTPRINTS_FRAME::InitDisplay()
GetBoard()->m_Modules.PushBack( module ); GetBoard()->m_Modules.PushBack( module );
Zoom_Automatique( false ); Zoom_Automatique( false );
} }
else // No footprint to display. Erase old footprint, if any else // No footprint to display. Erase old footprint, if any
{ {
......
...@@ -140,7 +140,7 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a ...@@ -140,7 +140,7 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
GetChars( aList.GetItem( ii ).m_Module ) ); GetChars( aList.GetItem( ii ).m_Module ) );
#else #else
msg.Printf( wxT( "%3zu %s:%s" ), newList.GetCount() + 1, msg.Printf( wxT( "%3zu %s:%s" ), newList.GetCount() + 1,
GetChars( aList.GetItem( ii ).GetLibraryName() ), GetChars( aList.GetItem( ii ).GetNickname() ),
GetChars( aList.GetItem( ii ).m_Module ) ); GetChars( aList.GetItem( ii ).m_Module ) );
#endif #endif
newList.Add( msg ); newList.Add( msg );
...@@ -164,7 +164,7 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a ...@@ -164,7 +164,7 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
aList.GetItem( ii ).m_Module.GetData() ); aList.GetItem( ii ).m_Module.GetData() );
#else #else
msg.Printf( wxT( "%3zu %s:%s" ), newList.GetCount() + 1, msg.Printf( wxT( "%3zu %s:%s" ), newList.GetCount() + 1,
GetChars( aList.GetItem( ii ).GetLibraryName() ), GetChars( aList.GetItem( ii ).GetNickname() ),
GetChars( aList.GetItem( ii ).m_Module ) ); GetChars( aList.GetItem( ii ).m_Module ) );
#endif #endif
newList.Add( msg ); newList.Add( msg );
...@@ -188,8 +188,9 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a ...@@ -188,8 +188,9 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
SetSelection( selection, true ); SetSelection( selection, true );
RefreshItems( 0L, m_footprintList.GetCount()-1 ); RefreshItems( 0L, m_footprintList.GetCount()-1 );
#if defined (__WXGTK__ ) #if defined (__WXGTK__ ) //&& wxMINOR_VERSION == 8
// @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the // @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the
// column parameter is -1. This was the only way to prevent GTK3 from // column parameter is -1. This was the only way to prevent GTK3 from
// ellipsizing long strings down to a few characters. It still doesn't set // ellipsizing long strings down to a few characters. It still doesn't set
// the scroll bars correctly (too short) but it's better than any of the // the scroll bars correctly (too short) but it's better than any of the
......
...@@ -128,7 +128,7 @@ void LIBRARY_LISTBOX::SetLibraryList( const wxArrayString& aList ) ...@@ -128,7 +128,7 @@ void LIBRARY_LISTBOX::SetLibraryList( const wxArrayString& aList )
{ {
RefreshItems( 0L, m_libraryList.Count()-1 ); RefreshItems( 0L, m_libraryList.Count()-1 );
#if defined (__WXGTK__ ) #if defined (__WXGTK__ ) // && wxMINOR_VERSION == 8
// @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the // @bug On GTK and wxWidgets 2.8.x, this will assert in debug builds because the
// column parameter is -1. This was the only way to prevent GTK3 from // column parameter is -1. This was the only way to prevent GTK3 from
// ellipsizing long strings down to a few characters. It still doesn't set // ellipsizing long strings down to a few characters. It still doesn't set
......
...@@ -47,13 +47,21 @@ class FP_LIB_TABLE; ...@@ -47,13 +47,21 @@ class FP_LIB_TABLE;
class FOOTPRINT_INFO class FOOTPRINT_INFO
{ {
public: public:
wxString m_libName; ///< Name of the library containing this module excluding path and ext.
wxString m_libPath; ///< The full library name and path associated the footprint. // friend bool operator<( const FOOTPRINT_INFO& item1, const FOOTPRINT_INFO& item2 );
wxString m_Module; ///< Module name.
int m_Num; ///< Order number in the display list. wxString m_nickname; ///< the library nickname, eventually
wxString m_Doc; ///< Footprint description.
wxString m_KeyWord; ///< Footprint key words. #if !defined(USE_FP_LIB_TABLE)
unsigned m_padCount; ///< Number of pads wxString m_lib_path;
#endif
wxString m_Module; ///< Module name.
int m_Num; ///< Order number in the display list.
wxString m_Doc; ///< Footprint description.
wxString m_KeyWord; ///< Footprint key words.
unsigned m_padCount; ///< Number of pads
FOOTPRINT_INFO() FOOTPRINT_INFO()
{ {
...@@ -61,20 +69,22 @@ public: ...@@ -61,20 +69,22 @@ public:
m_padCount = 0; m_padCount = 0;
} }
const wxString& GetFootprintName() const { return m_Module; } const wxString& GetFootprintName() const { return m_Module; }
void SetLibraryName( const wxString& aLibName ) { m_libName = aLibName; } void SetNickname( const wxString& aLibNickname ) { m_nickname = aLibNickname; }
const wxString& GetLibraryName() const { return m_libName; } const wxString& GetNickname() const { return m_nickname; }
void SetLibraryPath( const wxString& aLibPath ) { m_libPath = aLibPath; } #if !defined(USE_FP_LIB_TABLE)
const wxString& GetLibraryPath() const { return m_libPath; } void SetLibPath( const wxString& aLibPath ) { m_lib_path = aLibPath; }
const wxString& GetLibPath() const { return m_lib_path; }
#endif
/** /**
* Function InLibrary * Function InLibrary
* tests if the #FOOTPRINT_INFO object was loaded from \a aLibrary. * tests if the #FOOTPRINT_INFO object was loaded from \a aLibrary.
* *
* @param aLibrary is the file name or the fully qualified path and file name * @param aLibrary is the nickname of the library to test.
* to test. *
* @return true if the #FOOTPRINT_INFO object was loaded from \a aLibrary. Otherwise * @return true if the #FOOTPRINT_INFO object was loaded from \a aLibrary. Otherwise
* false. * false.
*/ */
...@@ -82,6 +92,21 @@ public: ...@@ -82,6 +92,21 @@ public:
}; };
/// FOOTPRINT object list sort function.
inline bool operator<( const FOOTPRINT_INFO& item1, const FOOTPRINT_INFO& item2 )
{
#if defined( USE_FP_LIB_TABLE )
int retv = StrNumCmp( item1.m_nickname, item2.m_nickname, INT_MAX, true );
if( retv != 0 )
return retv < 0;
#endif
return StrNumCmp( item1.m_Module, item2.m_Module, INT_MAX, true ) < 0;
}
class FOOTPRINT_LIST class FOOTPRINT_LIST
{ {
public: public:
...@@ -141,18 +166,4 @@ public: ...@@ -141,18 +166,4 @@ public:
bool ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname = NULL ); bool ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname = NULL );
}; };
/// FOOTPRINT object list sort function.
inline bool operator<( const FOOTPRINT_INFO& item1, const FOOTPRINT_INFO& item2 )
{
#if defined( USE_FP_LIB_TABLE )
int retv = StrNumCmp( item1.m_libName, item2.m_libName, INT_MAX, true );
if( retv != 0 )
return retv < 0;
#endif
return StrNumCmp( item1.m_Module, item2.m_Module, INT_MAX, true ) < 0;
}
#endif // FOOTPRINT_INFO_H_ #endif // FOOTPRINT_INFO_H_
...@@ -108,7 +108,7 @@ bool FP_CACHE_ITEM::IsModified() const ...@@ -108,7 +108,7 @@ bool FP_CACHE_ITEM::IsModified() const
if( !m_file_name.FileExists() ) if( !m_file_name.FileExists() )
return false; return false;
wxLogTrace( traceFootprintLibrary, wxT( "File <%s>, m_mod_time %s-%s, file mod time: %s-%s." ), wxLogTrace( traceFootprintLibrary, wxT( "File '%s', m_mod_time %s-%s, file mod time: %s-%s." ),
GetChars( m_file_name.GetFullPath() ), GetChars( m_file_name.GetFullPath() ),
GetChars( m_mod_time.FormatDate() ), GetChars( m_mod_time.FormatTime() ), GetChars( m_mod_time.FormatDate() ), GetChars( m_mod_time.FormatTime() ),
GetChars( m_file_name.GetModificationTime().FormatDate() ), GetChars( m_file_name.GetModificationTime().FormatDate() ),
...@@ -198,13 +198,13 @@ void FP_CACHE::Save() ...@@ -198,13 +198,13 @@ void FP_CACHE::Save()
{ {
if( !m_lib_path.DirExists() && !m_lib_path.Mkdir() ) if( !m_lib_path.DirExists() && !m_lib_path.Mkdir() )
{ {
THROW_IO_ERROR( wxString::Format( _( "Cannot create footprint library path <%s>" ), THROW_IO_ERROR( wxString::Format( _( "Cannot create footprint library path '%s'" ),
m_lib_path.GetPath().GetData() ) ); m_lib_path.GetPath().GetData() ) );
} }
if( !m_lib_path.IsDirWritable() ) if( !m_lib_path.IsDirWritable() )
{ {
THROW_IO_ERROR( wxString::Format( _( "Footprint library path <%s> is read only" ), THROW_IO_ERROR( wxString::Format( _( "Footprint library path '%s' is read only" ),
GetChars( m_lib_path.GetPath() ) ) ); GetChars( m_lib_path.GetPath() ) ) );
} }
...@@ -233,9 +233,12 @@ void FP_CACHE::Save() ...@@ -233,9 +233,12 @@ void FP_CACHE::Save()
if( wxRename( tempFileName, fn.GetFullPath() ) ) if( wxRename( tempFileName, fn.GetFullPath() ) )
{ {
THROW_IO_ERROR( wxString::Format( _( "Cannot rename temporary file <%s> to footprint library file <%s>" ), wxString msg = wxString::Format(
tempFileName.GetData(), _( "Cannot rename temporary file '%s' to footprint library file '%s'" ),
fn.GetFullPath().GetData() ) ); GetChars( tempFileName ),
GetChars( fn.GetFullPath() )
);
THROW_IO_ERROR( msg );
} }
it->second->UpdateModificationTime(); it->second->UpdateModificationTime();
...@@ -250,8 +253,12 @@ void FP_CACHE::Load() ...@@ -250,8 +253,12 @@ void FP_CACHE::Load()
if( !dir.IsOpened() ) if( !dir.IsOpened() )
{ {
THROW_IO_ERROR( wxString::Format( _( "Footprint library path <%s> does not exist" ), wxString msg = wxString::Format(
m_lib_path.GetPath().GetData() ) ); _( "Footprint library path '%s' does not exist" ),
GetChars( m_lib_path.GetPath() )
);
THROW_IO_ERROR( msg );
} }
wxString fpFileName; wxString fpFileName;
...@@ -294,9 +301,12 @@ void FP_CACHE::Remove( const wxString& aFootprintName ) ...@@ -294,9 +301,12 @@ void FP_CACHE::Remove( const wxString& aFootprintName )
if( it == m_modules.end() ) if( it == m_modules.end() )
{ {
THROW_IO_ERROR( wxString::Format( _( "library <%s> has no footprint '%s' to delete" ), wxString msg = wxString::Format(
m_lib_path.GetPath().GetData(), _( "library '%s' has no footprint '%s' to delete" ),
aFootprintName.GetData() ) ); GetChars( m_lib_path.GetPath() ),
GetChars( aFootprintName )
);
THROW_IO_ERROR( msg );
} }
// Remove the module from the cache and delete the module file from the library. // Remove the module from the cache and delete the module file from the library.
...@@ -1733,8 +1743,12 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri ...@@ -1733,8 +1743,12 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
if( !m_cache->IsWritable() ) if( !m_cache->IsWritable() )
{ {
THROW_IO_ERROR( wxString::Format( _( "Library <%s> is read only" ), wxString msg = wxString::Format(
aLibraryPath.GetData() ) ); _( "Library '%s' is read only" ),
GetChars( aLibraryPath )
);
THROW_IO_ERROR( msg );
} }
std::string footprintName = aFootprint->GetFPID().GetFootprintName(); std::string footprintName = aFootprint->GetFPID().GetFootprintName();
...@@ -1747,13 +1761,13 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri ...@@ -1747,13 +1761,13 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
if( !fn.IsOk() ) if( !fn.IsOk() )
{ {
THROW_IO_ERROR( wxString::Format( _( "Footprint file name <%s> is not valid." ), THROW_IO_ERROR( wxString::Format( _( "Footprint file name '%s' is not valid." ),
GetChars( fn.GetFullPath() ) ) ); GetChars( fn.GetFullPath() ) ) );
} }
if( fn.FileExists() && !fn.IsFileWritable() ) if( fn.FileExists() && !fn.IsFileWritable() )
{ {
THROW_IO_ERROR( wxString::Format( _( "user does not have write permission to delete file <%s> " ), THROW_IO_ERROR( wxString::Format( _( "user does not have write permission to delete file '%s' " ),
GetChars( fn.GetFullPath() ) ) ); GetChars( fn.GetFullPath() ) ) );
} }
...@@ -1796,7 +1810,7 @@ void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFoo ...@@ -1796,7 +1810,7 @@ void PCB_IO::FootprintDelete( const wxString& aLibraryPath, const wxString& aFoo
if( !m_cache->IsWritable() ) if( !m_cache->IsWritable() )
{ {
THROW_IO_ERROR( wxString::Format( _( "Library <%s> is read only" ), THROW_IO_ERROR( wxString::Format( _( "Library '%s' is read only" ),
aLibraryPath.GetData() ) ); aLibraryPath.GetData() ) );
} }
...@@ -1808,7 +1822,7 @@ void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES* ...@@ -1808,7 +1822,7 @@ void PCB_IO::FootprintLibCreate( const wxString& aLibraryPath, const PROPERTIES*
{ {
if( wxDir::Exists( aLibraryPath ) ) if( wxDir::Exists( aLibraryPath ) )
{ {
THROW_IO_ERROR( wxString::Format( _( "cannot overwrite library path <%s>" ), THROW_IO_ERROR( wxString::Format( _( "cannot overwrite library path '%s'" ),
aLibraryPath.GetData() ) ); aLibraryPath.GetData() ) );
} }
...@@ -1833,7 +1847,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* ...@@ -1833,7 +1847,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES*
if( !fn.IsDirWritable() ) if( !fn.IsDirWritable() )
{ {
THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory <%s>" ), THROW_IO_ERROR( wxString::Format( _( "user does not have permission to delete directory '%s'" ),
aLibraryPath.GetData() ) ); aLibraryPath.GetData() ) );
} }
...@@ -1841,7 +1855,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* ...@@ -1841,7 +1855,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES*
if( dir.HasSubDirs() ) if( dir.HasSubDirs() )
{ {
THROW_IO_ERROR( wxString::Format( _( "library directory <%s> has unexpected sub-directories" ), THROW_IO_ERROR( wxString::Format( _( "library directory '%s' has unexpected sub-directories" ),
aLibraryPath.GetData() ) ); aLibraryPath.GetData() ) );
} }
...@@ -1860,7 +1874,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* ...@@ -1860,7 +1874,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES*
if( tmp.GetExt() != KiCadFootprintFileExtension ) if( tmp.GetExt() != KiCadFootprintFileExtension )
{ {
THROW_IO_ERROR( wxString::Format( _( "unexpected file <%s> was found in library path '%s'" ), THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' was found in library path '%s'" ),
files[i].GetData(), aLibraryPath.GetData() ) ); files[i].GetData(), aLibraryPath.GetData() ) );
} }
} }
...@@ -1878,7 +1892,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES* ...@@ -1878,7 +1892,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, const PROPERTIES*
// we don't want that. we want bare metal portability with no UI here. // we don't want that. we want bare metal portability with no UI here.
if( !wxRmdir( aLibraryPath ) ) if( !wxRmdir( aLibraryPath ) )
{ {
THROW_IO_ERROR( wxString::Format( _( "footprint library <%s> cannot be deleted" ), THROW_IO_ERROR( wxString::Format( _( "footprint library '%s' cannot be deleted" ),
aLibraryPath.GetData() ) ); aLibraryPath.GetData() ) );
} }
......
...@@ -516,7 +516,7 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow, ...@@ -516,7 +516,7 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow,
{ {
wxArrayString cols; wxArrayString cols;
cols.Add( MList.GetItem( ii ).GetFootprintName() ); cols.Add( MList.GetItem( ii ).GetFootprintName() );
cols.Add( MList.GetItem( ii ).GetLibraryName() ); cols.Add( MList.GetItem( ii ).GetNickname() );
rows.push_back( cols ); rows.push_back( cols );
} }
} }
...@@ -531,7 +531,7 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow, ...@@ -531,7 +531,7 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow,
{ {
wxArrayString cols; wxArrayString cols;
cols.Add( MList.GetItem( ii ).GetFootprintName() ); cols.Add( MList.GetItem( ii ).GetFootprintName() );
cols.Add( MList.GetItem( ii ).GetLibraryName() ); cols.Add( MList.GetItem( ii ).GetNickname() );
rows.push_back( cols ); rows.push_back( cols );
} }
} }
...@@ -542,7 +542,7 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow, ...@@ -542,7 +542,7 @@ wxString PCB_BASE_FRAME::SelectFootprint( EDA_DRAW_FRAME* aWindow,
{ {
wxArrayString cols; wxArrayString cols;
cols.Add( MList.GetItem( ii ).GetFootprintName() ); cols.Add( MList.GetItem( ii ).GetFootprintName() );
cols.Add( MList.GetItem( ii ).GetLibraryName() ); cols.Add( MList.GetItem( ii ).GetNickname() );
rows.push_back( cols ); rows.push_back( cols );
} }
} }
......
...@@ -59,4 +59,6 @@ PNS_ITEM* PNS_SOLID::Clone() const ...@@ -59,4 +59,6 @@ PNS_ITEM* PNS_SOLID::Clone() const
{ {
// solids are never cloned as the shove algorithm never moves them // solids are never cloned as the shove algorithm never moves them
assert( false ); assert( false );
return NULL;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment