diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index 5d57f954b1..cf3df60099 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -6,9 +6,9 @@ * * Copyright (C) 1992-2015 Jean-Pierre Charras jp.charras at wanadoo.fr * Copyright (C) 1992-2010 Lorenzo Marcantonio - * Copyright (C) 2011 Wayne Stambaugh + * Copyright (C) 2011 Wayne Stambaugh * - * Copyright (C) 1992-2015 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 1992-2017 KiCad Developers, see change_log.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 @@ -62,7 +62,7 @@ void SCH_EDIT_FRAME::PlotSchematic( wxCommandEvent& event ) // save project config if the prj config has changed: if( dlg.PrjConfigChanged() ) - SaveProjectSettings( true ); + SaveProjectSettings( false ); } @@ -80,7 +80,6 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* parent ) : } - // Initialize the dialog options: void DIALOG_PLOT_SCHEMATIC::initDlg() { @@ -157,8 +156,10 @@ void DIALOG_PLOT_SCHEMATIC::initDlg() OnPlotFormatSelection( cmd_event ); } -/* - * TODO: Copy of DIALOG_PLOT::OnOutputDirectoryBrowseClicked in dialog_plot.cpp, maybe merge to a common method. + +/** + * @todo Copy of DIALOG_PLOT::OnOutputDirectoryBrowseClicked in dialog_plot.cpp, maybe merge to + * a common method. */ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { @@ -189,13 +190,14 @@ void DIALOG_PLOT_SCHEMATIC::OnOutputDirectoryBrowseClicked( wxCommandEvent& even if( dialog.ShowModal() == wxID_YES ) { if( !dirName.MakeRelativeTo( defaultPath ) ) - wxMessageBox( _( "Cannot make path relative (target volume different from file volume)!" ), - _( "Plot Output Directory" ), wxOK | wxICON_ERROR ); + wxMessageBox( _( "Cannot make path relative (target volume different from file " + "volume)!" ), _( "Plot Output Directory" ), wxOK | wxICON_ERROR ); } m_outputDirectoryName->SetValue( dirName.GetFullPath() ); } + PlotFormat DIALOG_PLOT_SCHEMATIC::GetPlotFileFormat() { switch( m_plotFormatOpt->GetSelection() ) @@ -224,6 +226,7 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions() m_config->Write( PLOT_HPGL_ORIGIN_KEY, GetPlotOriginCenter() ); m_HPGLPaperSizeSelect = m_HPGLPaperSizeOption->GetSelection(); m_config->Write( PLOT_HPGL_PAPERSIZE_KEY, m_HPGLPaperSizeSelect ); + // HPGL Pen Size is stored in mm in config m_config->Write( PLOT_HPGL_PEN_SIZE_KEY, m_HPGLPenSize/IU_PER_MM ); @@ -238,7 +241,6 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions() m_configChanged = true; m_parent->SetPlotDirectoryName( path ); - } @@ -331,6 +333,7 @@ void DIALOG_PLOT_SCHEMATIC::PlotSchematic( bool aPlotAll ) } } + wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName( wxTextCtrl* aOutputDirectoryName, wxString& aPlotFileName, wxString& aExtension, @@ -339,7 +342,7 @@ wxFileName DIALOG_PLOT_SCHEMATIC::createPlotFileName( wxTextCtrl* aOutputDirecto wxString outputDirName = aOutputDirectoryName->GetValue(); wxFileName outputDir = wxFileName::DirName( outputDirName ); - wxString plotFileName = Prj().AbsolutePath( aPlotFileName + wxT(".") + aExtension); + wxString plotFileName = Prj().AbsolutePath( aPlotFileName + wxT( "." ) + aExtension); if( !EnsureFileDirectoryExists( &outputDir, plotFileName, aReporter ) ) {