]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/printmac.cpp
fixed crash in HitTest() with y position below the last line
[wxWidgets.git] / src / mac / carbon / printmac.cpp
index 08a6bf77adc5cff8fed862dd499249361a3e0c25..426bd42de32f1ef498dc99f58deb2da4b8b2cd40 100644 (file)
@@ -136,7 +136,6 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
   // Create an abort window
   wxBeginBusyCursor();
 
-/*
   wxWindow *win = CreateAbortWindow(parent, printout);
   wxYield();
 
@@ -145,11 +144,11 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
     wxEndBusyCursor();
     wxMessageBox("Sorry, could not create an abort dialog.", "Print Error", wxOK, parent);
     delete dc;
+    return FALSE;
   }
   sm_abortWindow = win;
   sm_abortWindow->Show(TRUE);
   wxYield();
-*/
 
   printout->OnBeginPrinting();
   
@@ -178,6 +177,11 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
       }
       else
       {
+               GrafPtr thePort ;
+               GetPort( &thePort ) ;
+               wxYield() ;
+               SetPort( thePort ) ;
+
         dc->StartPage();
         keepGoing = printout->OnPrintPage(pn);
         dc->EndPage();