X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb37e1d2f35f042532116e950334ce5b77b0189d..dfafa7029d8d5b19b348f1b080cd71a42829d804:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 5fe427ea14..8cd032ff03 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -10,7 +10,7 @@ #ifdef __GNUG__ -#pragma implementation +#pragma implementation "htmprint.h" #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -26,6 +26,7 @@ #include "wx/log.h" #include "wx/intl.h" #include "wx/dc.h" + #include "wx/msgdlg.h" #endif #if wxUSE_HTML && wxUSE_PRINTING_ARCHITECTURE && wxUSE_STREAMS @@ -543,6 +544,13 @@ void wxHtmlEasyPrinting::PrinterSetup() void wxHtmlEasyPrinting::PageSetup() { + if (!m_PrintData->Ok()) + { + wxMessageBox(_("Sorry, there was a problem: you may need to set a default printer."), + _("Page Setup Problem"), wxICON_INFORMATION|wxOK, m_Frame); + return; + } + m_PageSetupData->SetPrintData(*m_PrintData); wxPageSetupDialog pageSetupDialog(m_Frame, m_PageSetupData);