Fix shadowed definition of EAGLE constant

This commit is contained in:
Ian McInerney 2022-09-24 00:08:32 +01:00
parent 31498673b7
commit 6310f84a57
3 changed files with 15 additions and 16 deletions

View File

@ -34,7 +34,7 @@ bool IsFileFromEDATool( const wxFileName& aFileName, const EDA_TOOLS aTool )
{
switch( aTool )
{
case EAGLE:
case EDA_TOOLS::EAGLE:
if( textFile.GetLineCount() > 2
&& textFile[1].StartsWith( wxT( "<!DOCTYPE eagle SYSTEM" ) )
&& textFile[2].StartsWith( wxT( "<eagle version" ) ) )
@ -50,4 +50,4 @@ bool IsFileFromEDATool( const wxFileName& aFileName, const EDA_TOOLS aTool )
}
return false;
}
}

View File

@ -37,7 +37,7 @@
/**
* Enumeration of tools
*/
enum EDA_TOOLS
enum class EDA_TOOLS
{
EAGLE
};
@ -52,4 +52,4 @@ enum EDA_TOOLS
*/
bool IsFileFromEDATool( const wxFileName& aFileName, const EDA_TOOLS aTool );
#endif
#endif

View File

@ -359,7 +359,7 @@ int KICAD_MANAGER_CONTROL::ImportNonKicadProj( const TOOL_EVENT& aEvent )
{
// Check if droppedFile is an eagle file.
// If not, return and do not import files.
if( !IsFileFromEDATool( droppedFileName, EAGLE ) )
if( !IsFileFromEDATool( droppedFileName, EDA_TOOLS::EAGLE ) )
return -1;
schFileExtension = EagleSchematicFileExtension;
@ -367,19 +367,18 @@ int KICAD_MANAGER_CONTROL::ImportNonKicadProj( const TOOL_EVENT& aEvent )
schFileType = SCH_IO_MGR::SCH_EAGLE;
pcbFileType = IO_MGR::EAGLE;
}
// Cadstar project.
else if( droppedFileName.GetExt() == CadstarSchematicFileExtension
|| droppedFileName.GetExt() == CadstarPcbFileExtension )
{
schFileExtension = CadstarSchematicFileExtension;
pcbFileExtension = CadstarPcbFileExtension;
schFileType = SCH_IO_MGR::SCH_CADSTAR_ARCHIVE;
pcbFileType = IO_MGR::CADSTAR_PCB_ARCHIVE;
}
else
{
// Cadstar project.
if( droppedFileName.GetExt() == CadstarSchematicFileExtension
|| droppedFileName.GetExt() == CadstarPcbFileExtension )
{
schFileExtension = CadstarSchematicFileExtension;
pcbFileExtension = CadstarPcbFileExtension;
schFileType = SCH_IO_MGR::SCH_CADSTAR_ARCHIVE;
pcbFileType = IO_MGR::CADSTAR_PCB_ARCHIVE;
}
else
return -1;
return -1;
}
IMPORT_PROJ_HELPER importProj( m_frame, droppedFileName.GetFullPath(), schFileExtension,