Pcbnew: fix Bug #1380943 (Filled polygons with thick outlines are missing last outline thick segment in gerber)
Remove a debug message in searchhelpfilefullpath.cpp.
This commit is contained in:
parent
f06bfe6d70
commit
9c64b061fe
|
@ -370,7 +370,7 @@ void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAn
|
|||
fprintf( outputFile, "X%dY%dI%dJ%dD01*\n",
|
||||
KiROUND( devEnd.x ), KiROUND( devEnd.y ),
|
||||
KiROUND( devCenter.x ), KiROUND( devCenter.y ) );
|
||||
fprintf( outputFile, "G74*\nG01*\n" ); // Back to single quadrant and linear interp.
|
||||
fprintf( outputFile, "G01*\n" ); // Back to linear interp.
|
||||
}
|
||||
|
||||
|
||||
|
@ -410,6 +410,11 @@ void GERBER_PLOTTER:: PlotPoly( const std::vector< wxPoint >& aCornerList,
|
|||
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
|
||||
LineTo( aCornerList[ii] );
|
||||
|
||||
// Ensure the thick outline is closed for filled polygons
|
||||
// (if not filled, could be only a polyline)
|
||||
if( aFill && ( aCornerList[aCornerList.size()-1] != aCornerList[0] ) )
|
||||
LineTo( aCornerList[0] );
|
||||
|
||||
PenFinish();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ wxString FindFileInSearchPaths( const SEARCH_STACK& aStack,
|
|||
|
||||
if( fn.DirExists() )
|
||||
{
|
||||
wxLogMessage(fn.GetFullPath()+aFilename);
|
||||
paths.Add( fn.GetPath() );
|
||||
}
|
||||
}
|
||||
|
@ -81,9 +80,14 @@ wxString SearchHelpFileFullPath( const SEARCH_STACK& aSStack, const wxString& aB
|
|||
|
||||
wxLocale* i18n = Pgm().GetLocale();
|
||||
|
||||
// Step 1 : Try to find help file in help/<canonical name>
|
||||
subdirs.Add( i18n->GetCanonicalName() );
|
||||
altsubdirs.Add( i18n->GetCanonicalName() );
|
||||
// We try to find help file in help/<canonical name>
|
||||
// If fails, try to find help file in help/<short canonical name>
|
||||
// If fails, try to find help file in help/en
|
||||
wxArrayString locale_name_dirs;
|
||||
locale_name_dirs.Add( i18n->GetCanonicalName() ); // canonical name like fr_FR
|
||||
// wxLocale::GetName() does not return always the short name
|
||||
locale_name_dirs.Add( i18n->GetName().BeforeLast( '_' ) ); // short canonical name like fr
|
||||
locale_name_dirs.Add( wxT("en") ); // default (en)
|
||||
|
||||
#if defined(DEBUG) && 0
|
||||
ss.Show( __func__ );
|
||||
|
@ -93,58 +97,35 @@ wxString SearchHelpFileFullPath( const SEARCH_STACK& aSStack, const wxString& aB
|
|||
// Help files can be html (.html ext) or pdf (.pdf ext) files.
|
||||
// Therefore, <BaseName>.html file is searched and if not found,
|
||||
// <BaseName>.pdf file is searched in the same paths
|
||||
wxString fn;
|
||||
|
||||
wxString fn = FindFileInSearchPaths( ss, aBaseName + wxT(".html"), &altsubdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &altsubdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".html"), &subdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &subdirs );
|
||||
|
||||
// Step 2 : if not found Try to find help file in help/<short name>
|
||||
if( !fn )
|
||||
for( unsigned ii = 0; ii < locale_name_dirs.GetCount(); ii++ )
|
||||
{
|
||||
subdirs.RemoveAt( subdirs.GetCount() - 1 );
|
||||
altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 );
|
||||
|
||||
// wxLocale::GetName() does not return always the short name
|
||||
subdirs.Add( i18n->GetName().BeforeLast( '_' ) );
|
||||
altsubdirs.Add( i18n->GetName().BeforeLast( '_' ) );
|
||||
subdirs.Add( locale_name_dirs[ii] );
|
||||
altsubdirs.Add( locale_name_dirs[ii] );
|
||||
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".html"), &altsubdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &altsubdirs );
|
||||
if( !fn.IsEmpty() )
|
||||
break;
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".html"), &subdirs );
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &altsubdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &subdirs );
|
||||
}
|
||||
if( !fn.IsEmpty() )
|
||||
break;
|
||||
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".html"), &subdirs );
|
||||
|
||||
if( !fn.IsEmpty() )
|
||||
break;
|
||||
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &subdirs );
|
||||
|
||||
if( !fn.IsEmpty() )
|
||||
break;
|
||||
|
||||
// Step 3 : if not found Try to find help file in help/en
|
||||
if( !fn )
|
||||
{
|
||||
subdirs.RemoveAt( subdirs.GetCount() - 1 );
|
||||
altsubdirs.RemoveAt( altsubdirs.GetCount() - 1 );
|
||||
subdirs.Add( wxT( "en" ) );
|
||||
altsubdirs.Add( wxT( "en" ) );
|
||||
|
||||
fn = FindFileInSearchPaths( ss, aBaseName, &altsubdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &altsubdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".html"), &subdirs );
|
||||
|
||||
if( !fn )
|
||||
fn = FindFileInSearchPaths( ss, aBaseName + wxT(".pdf"), &subdirs );
|
||||
}
|
||||
|
||||
return fn;
|
||||
|
|
Loading…
Reference in New Issue