From efdf28f67e5b35ba849d4ad565a152b2bef2942b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 27 Nov 2012 21:12:39 +0100 Subject: [PATCH] Polyline.cpp: fix a bad wxASSERT test which generate error messages in Debug mode when there is no error, in DEBUG mode, when filling zones with holes. --- eeschema/build_BOM.cpp | 2 +- polygon/PolyLine.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eeschema/build_BOM.cpp b/eeschema/build_BOM.cpp index b620a052ae..6cc0728096 100644 --- a/eeschema/build_BOM.cpp +++ b/eeschema/build_BOM.cpp @@ -245,7 +245,7 @@ order = Alphab. ) count = %d\n\n" labeltype = wxT( "Global " ); sheetpath = m_labelList[ii].GetSheetPath().PathHumanReadable(); - msg.Printf( _( "> %-28.28s %s %s\n" ), + msg.Printf( wxT( "> %-28.28s %s %s\n" ), GetChars( label->GetText() ), GetChars( labeltype ), GetChars( returnURLItemLocation( sheetpath, label->m_Pos ) ) ); diff --git a/polygon/PolyLine.cpp b/polygon/PolyLine.cpp index 1a879b9508..bd018853a2 100644 --- a/polygon/PolyLine.cpp +++ b/polygon/PolyLine.cpp @@ -1321,12 +1321,12 @@ void ConvertPolysListWithHolesToOnePolygon( const std::vector& aPolysL polysholes.push_back( poly_tmp ); } } - mainpoly -= polysholes; // copy polygon with no holes to destination - // We should have only one polygon in list - wxASSERT( mainpoly.size() != 1 ); + // Because all holes are now linked to the main outline + // by overlapping segments, we should have only one polygon in list + wxASSERT( mainpoly.size() == 1 ); KI_POLYGON& poly_nohole = mainpoly[0]; CPolyPt corner( 0, 0, false );