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" ) ) )

View File

@ -37,7 +37,7 @@
/**
* Enumeration of tools
*/
enum EDA_TOOLS
enum class EDA_TOOLS
{
EAGLE
};

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,10 +367,8 @@ int KICAD_MANAGER_CONTROL::ImportNonKicadProj( const TOOL_EVENT& aEvent )
schFileType = SCH_IO_MGR::SCH_EAGLE;
pcbFileType = IO_MGR::EAGLE;
}
else
{
// Cadstar project.
if( droppedFileName.GetExt() == CadstarSchematicFileExtension
else if( droppedFileName.GetExt() == CadstarSchematicFileExtension
|| droppedFileName.GetExt() == CadstarPcbFileExtension )
{
schFileExtension = CadstarSchematicFileExtension;
@ -379,6 +377,7 @@ int KICAD_MANAGER_CONTROL::ImportNonKicadProj( const TOOL_EVENT& aEvent )
pcbFileType = IO_MGR::CADSTAR_PCB_ARCHIVE;
}
else
{
return -1;
}