Avoid creation of the zones_dump.txt file each time the zones are re-filled, when this option is not enabled.

This commit is contained in:
jean-pierre charras 2015-08-02 19:39:24 +02:00
parent 9f61254839
commit b0585253c3
2 changed files with 9 additions and 3 deletions

View File

@ -31,7 +31,11 @@
SHAPE_FILE_IO::SHAPE_FILE_IO( const std::string& aFilename, bool aAppend )
{
m_groupActive = false;
if( aFilename.length() )
m_file = fopen ( aFilename.c_str(), aAppend ? "ab" : "wb" );
else
m_file = NULL;
// fixme: exceptions
}

View File

@ -404,7 +404,9 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList_NG( BOARD* aPcb )
double correctionFactor;
int outline_half_thickness = m_ZoneMinThickness / 2;
std::auto_ptr<SHAPE_FILE_IO> dumper( new SHAPE_FILE_IO( "zones_dump.txt", true ) );
std::auto_ptr<SHAPE_FILE_IO> dumper( new SHAPE_FILE_IO(
g_DumpZonesWhenFilling ? "zones_dump.txt" : "", true ) );
// Set the number of segments in arc approximations
if( m_ArcToSegmentsCount == ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF )