From 13bcfc79a1ea7449791ea250840e3c01cde5abf7 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 28 Feb 2021 15:52:14 +0100 Subject: [PATCH] Eeschema, DIALOG_ERC: fix minor issues: - avoid printing twice the messages when running tests (Report() was called twice). - when saving the report open the project directory by default. --- eeschema/dialogs/dialog_erc.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index d56bce77e6..f2123850a1 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -142,10 +142,9 @@ bool DIALOG_ERC::updateUI() void DIALOG_ERC::AdvancePhase( const wxString& aMessage ) { + // Will also call Report( aMessage ): PROGRESS_REPORTER::AdvancePhase( aMessage ); SetCurrentProgress( 0.0 ); - - m_messages->Report( aMessage ); } @@ -732,9 +731,9 @@ void DIALOG_ERC::deleteAllMarkers( bool aIncludeExclusions ) void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent ) { - wxFileName fn( "./ERC." + ReportFileExtension ); + wxFileName fn( "erc." + 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 )