Fix export_vrml.cpp warnings and removes the few instances of wxT() in that file.

This commit is contained in:
Cirilo Bernardo 2016-09-23 09:55:33 +02:00 committed by jean-pierre charras
parent b8dc6af706
commit 8ea643cefc
1 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2009-2013 Lorenzo Mercantonio * Copyright (C) 2009-2013 Lorenzo Mercantonio
* Copyright (C) 2014 Cirilo Bernardo * Copyright (C) 2014-2016 Cirilo Bernardo
* Copyright (C) 2013 Jean-Pierre Charras jp.charras at wanadoo.fr * Copyright (C) 2013 Jean-Pierre Charras jp.charras at wanadoo.fr
* Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2004-2016 KiCad Developers, see AUTHORS.txt for contributors.
* *
@ -131,6 +131,7 @@ struct VRML_COLOR
enum VRML_COLOR_INDEX enum VRML_COLOR_INDEX
{ {
VRML_COLOR_NONE = -1,
VRML_COLOR_PCB = 0, VRML_COLOR_PCB = 0,
VRML_COLOR_TRACK, VRML_COLOR_TRACK,
VRML_COLOR_SILK, VRML_COLOR_SILK,
@ -831,9 +832,8 @@ static void export_vrml_board( MODEL_VRML& aModel, BOARD* pcb )
if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) ) if( !pcb->GetBoardPolygonOutlines( bufferPcbOutlines, allLayerHoles, &msg ) )
{ {
msg << wxT( "\n\n" ) << msg << "\n\n" <<
_( "Unable to calculate the board outlines;\n" _( "Unable to calculate the board outlines; fall back to using the board boundary box." );
"fall back to using the board boundary box." );
wxMessageBox( msg ); wxMessageBox( msg );
} }
@ -863,8 +863,8 @@ static void export_vrml_board( MODEL_VRML& aModel, BOARD* pcb )
if( seg < 0 ) if( seg < 0 )
{ {
msg << wxT( "\n\n" ) << msg << "\n\n" <<
_( "VRML Export Failed:\nCould not add holes to contours." ); _( "VRML Export Failed: Could not add holes to contours." );
wxMessageBox( msg ); wxMessageBox( msg );
return; return;
@ -1413,7 +1413,7 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule
if( srcModTime != destModTime ) if( srcModTime != destModTime )
{ {
wxLogDebug( wxT( "Copying 3D model %s to %s." ), wxLogDebug( "Copying 3D model %s to %s.",
GetChars( srcFile.GetFullPath() ), GetChars( srcFile.GetFullPath() ),
GetChars( dstFile.GetFullPath() ) ); GetChars( dstFile.GetFullPath() ) );
@ -1459,14 +1459,14 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule
if( USE_RELPATH ) if( USE_RELPATH )
{ {
wxFileName tmp = dstFile; wxFileName tmp = dstFile;
tmp.SetExt( wxT( "" ) ); tmp.SetExt( "" );
tmp.SetName( wxT( "" ) ); tmp.SetName( "" );
tmp.RemoveLastDir(); tmp.RemoveLastDir();
dstFile.MakeRelativeTo( tmp.GetPath() ); dstFile.MakeRelativeTo( tmp.GetPath() );
} }
wxString fn = dstFile.GetFullPath(); wxString fn = dstFile.GetFullPath();
fn.Replace( wxT( "\\" ), wxT( "/" ) ); fn.Replace( "\\", "/" );
output_file << TO_UTF8( fn ) << "\"\n } ]\n"; output_file << TO_UTF8( fn ) << "\"\n } ]\n";
output_file << " }\n"; output_file << " }\n";
} }
@ -1568,7 +1568,7 @@ bool PCB_EDIT_FRAME::ExportVRML_File( const wxString& aFullFileName, double aMMt
// Begin with the usual VRML boilerplate // Begin with the usual VRML boilerplate
wxString fn = aFullFileName; wxString fn = aFullFileName;
fn.Replace( wxT( "\\" ), wxT( "/" ) ); fn.Replace( "\\" , "/" );
output_file << "#VRML V2.0 utf8\n"; output_file << "#VRML V2.0 utf8\n";
output_file << "WorldInfo {\n"; output_file << "WorldInfo {\n";
output_file << " title \"" << TO_UTF8( fn ) << " - Generated by Pcbnew\"\n"; output_file << " title \"" << TO_UTF8( fn ) << " - Generated by Pcbnew\"\n";