Loading utils/idftools/idf_parser.cpp +26 −3 Original line number Diff line number Diff line Loading @@ -3053,6 +3053,27 @@ void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); // determine if there are any component outlines at all and avoid // writing an empty PLACEMENT section if there are no outlines. // this will cost a little time but prevents software such as // CircuitWorks from segfaulting on an empty section. bool hasOutlines = false; while( itcs != itce ) { if( itcs->second->GetOutlinesSize() > 0 ) { itcs = components.begin(); hasOutlines = true; break; } ++itcs; } if( hasOutlines ) { brd << ".PLACEMENT\n"; while( itcs != itce ) Loading @@ -3065,6 +3086,8 @@ void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) } } } catch( const std::exception& e ) { brd.exceptions( std::ios_base::goodbit ); Loading Loading
utils/idftools/idf_parser.cpp +26 −3 Original line number Diff line number Diff line Loading @@ -3053,6 +3053,27 @@ void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) std::map< std::string, IDF3_COMPONENT*>::iterator itcs = components.begin(); std::map< std::string, IDF3_COMPONENT*>::iterator itce = components.end(); // determine if there are any component outlines at all and avoid // writing an empty PLACEMENT section if there are no outlines. // this will cost a little time but prevents software such as // CircuitWorks from segfaulting on an empty section. bool hasOutlines = false; while( itcs != itce ) { if( itcs->second->GetOutlinesSize() > 0 ) { itcs = components.begin(); hasOutlines = true; break; } ++itcs; } if( hasOutlines ) { brd << ".PLACEMENT\n"; while( itcs != itce ) Loading @@ -3065,6 +3086,8 @@ void IDF3_BOARD::writeBoardFile( const std::string& aFileName ) } } } catch( const std::exception& e ) { brd.exceptions( std::ios_base::goodbit ); Loading