]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
really show the menubar (calling Show(TRUE) doesn't do it any more)
[wxWidgets.git] / src / common / docview.cpp
index 8e8c012701cc96f1427ad2c964883fdb6ce88bce..65e74723ad97b12bcc4d11c8db09d6aa280ecf74 100644 (file)
@@ -953,6 +953,12 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
     {
         // Pass two printout objects: for preview, and possible printing.
         wxPrintPreviewBase *preview = new wxPrintPreview(printout, view->OnCreatePrintout());
+        if ( !preview->Ok() )
+        {
+            delete preview;
+            wxMessageBox( _("Sorry, print preview needs a printer to be installed.") );
+            return;
+        }
 
         wxPreviewFrame *frame = new wxPreviewFrame(preview, (wxFrame *)wxTheApp->GetTopWindow(), _("Print Preview"),
                 wxPoint(100, 100), wxSize(600, 650));