diff --git a/gerbview/excellon_image.h b/gerbview/excellon_image.h index d56e539718..8845e8a55e 100644 --- a/gerbview/excellon_image.h +++ b/gerbview/excellon_image.h @@ -96,14 +96,12 @@ private: excellon_state m_State; // state of excellon file analysis bool m_SlotOn; // true during an oblong drill definition - bool m_format_known; // true if number format (2:4, etc) is known public: EXCELLON_IMAGE( int layer ) : GERBER_FILE_IMAGE( layer ) { m_State = READ_HEADER_STATE; m_SlotOn = false; - m_format_known = false; } diff --git a/gerbview/excellon_read_drill_file.cpp b/gerbview/excellon_read_drill_file.cpp index 7771245735..4eb2585216 100644 --- a/gerbview/excellon_read_drill_file.cpp +++ b/gerbview/excellon_read_drill_file.cpp @@ -526,7 +526,6 @@ bool EXCELLON_IMAGE::readToolInformation( char*& aText ) return true; } - bool EXCELLON_IMAGE::Execute_Drill_Command( char*& text ) { D_CODE* tool; @@ -537,50 +536,15 @@ bool EXCELLON_IMAGE::Execute_Drill_Command( char*& text ) switch( *text ) { case 'X': - case 'Y': - // Decode the coordinate format - if( !m_format_known ) - { - int nbdigits = 0; - int integer = m_GerbMetric ? fmtIntegerMM : fmtIntegerInch; - int mantissa; - char* read = text + 1; - - while( IsNumber( *read ) ) - { - if( *read == '.' ) - { - integer = nbdigits; - read++; - continue; - } - - if( ( *read >= '0' ) && ( *read <='9' ) ) - nbdigits++; - - read++; - } - - mantissa = nbdigits - integer; - - // Enforce minimum mantissa of 3 for metric - if( m_GerbMetric && mantissa < 3 ) - mantissa = 3; - - m_FmtScale.x = m_FmtScale.y = mantissa; - m_FmtLen.x = m_FmtLen.y = integer + mantissa; - - m_format_known = true; - } - ReadXYCoord( text ); break; - + case 'Y': + ReadXYCoord( text ); + break; case 'G': // G85 is found here for oval holes m_PreviousPos = m_CurrentPos; Execute_EXCELLON_G_Command( text ); break; - case 0: // E.O.L: execute command tool = GetDCODE( m_Current_Tool );