Pcbbnew: fix bug Bug #1172892 (bad drill map file names, when a point is used inside a board file name)
This commit is contained in:
parent
ec497d5d9a
commit
2080739f76
|
@ -440,9 +440,10 @@ void DIALOG_GENDRILL::GenDrillAndMapFiles(bool aGenDrill, bool aGenMap)
|
|||
if( choice >= m_Choice_Drill_Map->GetCount() )
|
||||
choice = 1;
|
||||
|
||||
fn.SetExt( wxEmptyString ); // Will be modified by GenDrillMap
|
||||
fn.SetExt( wxEmptyString ); // Will be added by GenDrillMap
|
||||
wxString fullfilename = fn.GetFullPath() + wxT( "-drl_map" );
|
||||
|
||||
GenDrillMap( fn.GetFullPath(), excellonWriter, filefmt[choice] );
|
||||
GenDrillMap( fullfilename, excellonWriter, filefmt[choice] );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -530,7 +531,7 @@ void DIALOG_GENDRILL::OnGenReportFile( wxCommandEvent& event )
|
|||
|
||||
|
||||
// Generate the drill map of the board
|
||||
void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName,
|
||||
void DIALOG_GENDRILL::GenDrillMap( const wxString aFullFileNameWithoutExt,
|
||||
EXCELLON_WRITER& aExcellonWriter,
|
||||
PlotFormat format )
|
||||
{
|
||||
|
@ -574,11 +575,9 @@ void DIALOG_GENDRILL::GenDrillMap( const wxString aFileName,
|
|||
return;
|
||||
}
|
||||
|
||||
/* Init file name */
|
||||
wxFileName fn = aFileName;
|
||||
fn.SetName( fn.GetName() + wxT( "-drl_map" ) );
|
||||
fn.SetExt( ext );
|
||||
wxString fullFilename = fn.GetFullPath();
|
||||
// Add file name extension
|
||||
wxString fullFilename = aFullFileNameWithoutExt;
|
||||
fullFilename << wxT(".") << ext;
|
||||
|
||||
bool success = aExcellonWriter.GenDrillMapFile( fullFilename,
|
||||
m_parent->GetPageSettings(),
|
||||
|
|
|
@ -228,11 +228,12 @@ public: EXCELLON_WRITER( BOARD* aPcb, wxPoint aOffset )
|
|||
/**
|
||||
* Function GenDrillMapFile
|
||||
* Plot a map of drill marks for holes.
|
||||
* @param aFullFileName : the name of this file (to plot it)
|
||||
* @param aFullFileNameWithoutExt : the full filename of the file to create,
|
||||
* without extension (will be added accordint ti the format)
|
||||
* @param aSheet : the paper sheet touse for plot
|
||||
* @param aFormat : one of the supported plot formats (see enum PlotFormat )
|
||||
*/
|
||||
bool GenDrillMapFile( const wxString& aFullFileName,
|
||||
bool GenDrillMapFile( const wxString& aFullFileNameWithoutExt,
|
||||
const PAGE_INFO& aSheet,
|
||||
PlotFormat aFormat );
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue