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:
parent
9f61254839
commit
b0585253c3
|
@ -31,7 +31,11 @@
|
|||
SHAPE_FILE_IO::SHAPE_FILE_IO( const std::string& aFilename, bool aAppend )
|
||||
{
|
||||
m_groupActive = false;
|
||||
m_file = fopen ( aFilename.c_str(), aAppend ? "ab" : "wb" );
|
||||
|
||||
if( aFilename.length() )
|
||||
m_file = fopen ( aFilename.c_str(), aAppend ? "ab" : "wb" );
|
||||
else
|
||||
m_file = NULL;
|
||||
|
||||
// fixme: exceptions
|
||||
}
|
||||
|
@ -82,4 +86,4 @@ void SHAPE_FILE_IO::Write( const SHAPE *aShape, const std::string aName )
|
|||
|
||||
fprintf(m_file,"shape %d %s %s\n", aShape->Type(), aName.c_str(), sh.c_str() );
|
||||
fflush(m_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 )
|
||||
|
|
Loading…
Reference in New Issue