From 5c621d32820a7c3a2e28bc7dfc53e4eed9db82da Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Sun, 2 Oct 2016 18:32:40 +1300 Subject: [PATCH] Fix filename in export error message If the file could not be written, we were reporting the error with the .3d filename, not the filename we were trying to write to. --- src/printing.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/printing.cc b/src/printing.cc index f97fa114..5c147655 100644 --- a/src/printing.cc +++ b/src/printing.cc @@ -728,14 +728,15 @@ svxPrintDlg::OnExport(wxCommandEvent&) { double marker_size = 0.8; try { - if (!Export(dlg.GetPath(), m_layout.title, + const wxString& export_fnm = dlg.GetPath(); + if (!Export(export_fnm, m_layout.title, m_layout.datestamp, m_layout.datestamp_numeric, mainfrm, m_layout.rot, m_layout.tilt, m_layout.get_effective_show_mask(), export_format(format_idx), input_projection.utf8_str(), grid, text_height, marker_size, m_layout.Scale)) { wxString m = wxString::Format(wmsg(/*Couldn’t write file “%s”*/402).c_str(), - m_File.c_str()); + export_fnm.c_str()); wxGetApp().ReportError(m); } } catch (const wxString & m) { -- 2.11.4.GIT