Pcbnew: plot dialog: minor enhancement and minor issue fix (could be a wxFromBuilder issue)

This commit is contained in:
jean-pierre charras
2011-02-01 19:37:32 +01:00
parent 85ae0373e3
commit 7bd85a393d
5 changed files with 3235 additions and 4404 deletions
+10 -2
View File
@@ -280,8 +280,16 @@ void DIALOG_PLOT::OnSetScaleOpt( wxCommandEvent& event )
void DIALOG_PLOT::OnOutputDirectoryBrowseClicked( wxCommandEvent& event )
{
wxDirDialog dirDialog( this, _( "Select Output Directory" ),
m_outputDirectoryName->GetValue() );
// Build the absolute path of current output plot directory
// to preselect it when opening the Di Dialog.
wxFileName fn( m_outputDirectoryName->GetValue() );
wxString path;
if( fn.IsRelative() )
path = wxGetCwd() + fn.GetPathSeparator() + m_outputDirectoryName->GetValue();
else
path = m_outputDirectoryName->GetValue();
wxDirDialog dirDialog( this, _( "Select Output Directory" ), path );
if( dirDialog.ShowModal() == wxID_CANCEL )
return;