diff --git a/common/dialogs/wx_html_report_panel.cpp b/common/dialogs/wx_html_report_panel.cpp index 9be4aa67bc..5d07b7b10c 100644 --- a/common/dialogs/wx_html_report_panel.cpp +++ b/common/dialogs/wx_html_report_panel.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +#include WX_HTML_REPORT_PANEL::WX_HTML_REPORT_PANEL( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : @@ -352,7 +354,14 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event ) wxFileName fn; if( m_reportFileName.empty() ) - fn = wxT( "./report.txt" ); + { + fn = wxT( "report.txt" ); + + KIWAY_HOLDER* parent = dynamic_cast( m_parent ); + + if( parent ) + fn.SetPath( parent->Prj().GetProjectPath() ); + } else fn = m_reportFileName; diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index a8bd658aed..3af99129e1 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -751,9 +751,9 @@ void DIALOG_DRC::OnSeverity( wxCommandEvent& aEvent ) void DIALOG_DRC::OnSaveReport( wxCommandEvent& aEvent ) { - wxFileName fn( "./DRC." + ReportFileExtension ); + wxFileName fn( "DRC." + ReportFileExtension ); - wxFileDialog dlg( this, _( "Save Report to File" ), fn.GetPath(), fn.GetFullName(), + wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(), ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); if( dlg.ShowModal() != wxID_OK )