Pcbnew: Fabrication Outputs: Footprint position (.pos) file CSV format : double quote ref, value and package name.

It avoid issues with texts containing a comma, as fields are separated by comma in csv file.

Fixes: lp:1747186
https://bugs.launchpad.net/kicad/+bug/1747186
This commit is contained in:
jean-pierre charras 2018-02-03 21:28:21 +01:00
parent a7a7f62cb7
commit 9c22303551
1 changed files with 7 additions and 7 deletions

View File

@ -4,7 +4,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2018 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -520,12 +520,12 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
LAYER_NUM layer = list[ii].m_Module->GetLayer();
wxASSERT( layer == F_Cu || layer == B_Cu );
wxString line = list[ii].m_Reference;
line << csv_sep;
line << list[ii].m_Value;
line << csv_sep;
line << list[ii].m_Module->GetFPID().GetLibItemName().wx_str();
line << csv_sep;
wxString line = "\"" + list[ii].m_Reference;
line << "\"" << csv_sep;
line << "\"" << list[ii].m_Value;
line << "\"" << csv_sep;
line << "\"" << list[ii].m_Module->GetFPID().GetLibItemName().wx_str();
line << "\"" << csv_sep;
line << wxString::Format( "%f%c%f%c%f",
footprint_pos.x * conv_unit, csv_sep,