From b4bbc3963011d8ff2647978f9a9af8fc6db39bfe Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Wed, 5 Jul 2017 20:13:58 +0200 Subject: [PATCH] Do not run PDF viewer if report generation was unsuccessful --- src/libmngr_frame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libmngr_frame.cpp b/src/libmngr_frame.cpp index 1c2a7e3..e5f74be 100644 --- a/src/libmngr_frame.cpp +++ b/src/libmngr_frame.cpp @@ -907,7 +907,9 @@ void libmngrFrame::OnFootprintReport(wxCommandEvent& /*event*/) report.SetPage(format, (landscape != 0)); report.FootprintOptions(opt_description != 0, opt_padinfo != 0, opt_labels != 0); report.SetFont(fontsize); - report.FootprintReport(this, library, modules, reportfile); + if(!report.FootprintReport(this, library, modules, reportfile)) { + return; + } m_statusBar->SetStatusText(wxT("Finished report")); #if wxMAJOR_VERSION < 3 @@ -6988,4 +6990,4 @@ void libmngrFrame::UpdateDetails(int fp) m_chkValueLabelVisible->Enable(DefEnable); FieldEdited = false; /* clear this flag for all implicit changes */ -} \ No newline at end of file +}