X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1aedb1dd8b6e2ace57901cbe0ce70786ddb67947..dfafa7029d8d5b19b348f1b080cd71a42829d804:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 801403e017..8cd032ff03 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -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);