]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/prntdlgg.cpp
"continue;" restored to prevent the app from going into infinite loop
[wxWidgets.git] / src / generic / prntdlgg.cpp
index f7dc47a9dff2b8e9054beff5c5a13a842ba1ecf6..5a89abe6e5491c06eab1ab5c871d2bcf965ce857 100644 (file)
@@ -156,14 +156,14 @@ void wxGenericPrintDialog::OnOK(wxCommandEvent& WXUNUSED(event))
   {
     wxThePrintSetupData->SetPrinterMode(PS_FILE);
 
-    char *f = wxFileSelector(_("PostScript file"),
-        wxPathOnly(wxThePrintSetupData->GetPrinterFile()),
-        wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()),
-        "ps", "*.ps", 0, this);
-    if (f)
-      wxThePrintSetupData->SetPrinterFile(f);
-    else
-      return;
+    wxString f = wxFileSelector(_("PostScript file"),
+                                wxPathOnly(wxThePrintSetupData->GetPrinterFile()),
+                                wxFileNameFromPath(wxThePrintSetupData->GetPrinterFile()),
+                                "ps", "*.ps", 0, this);
+    if ( f.IsEmpty() )
+        return;
+
+    wxThePrintSetupData->SetPrinterFile(f);
   }
   else
     wxThePrintSetupData->SetPrinterMode(PS_PRINTER);
@@ -425,7 +425,7 @@ void wxGenericPageSetupDialog::OnPrinter(wxCommandEvent& WXUNUSED(event))
     wxPrintData data;
     data.SetSetupDialog(TRUE);
     wxPrintDialog *printDialog = new wxPrintDialog(this, & data);
-    int ret = printDialog->ShowModal();
+    printDialog->ShowModal();
 
     printDialog->Destroy();