X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..2eefc6d59ec6299faf87a5a3d34c65b882660abf:/src/mac/printmac.cpp diff --git a/src/mac/printmac.cpp b/src/mac/printmac.cpp index 33506c4548..60d15137cf 100644 --- a/src/mac/printmac.cpp +++ b/src/mac/printmac.cpp @@ -139,7 +139,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) wxBeginBusyCursor(); wxWindow *win = CreateAbortWindow(parent, printout); - wxYield(); + wxSafeYield(win,true); if (!win) { @@ -150,7 +150,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) } sm_abortWindow = win; sm_abortWindow->Show(TRUE); - wxYield(); + wxSafeYield(win,true); printout->OnBeginPrinting(); @@ -181,8 +181,8 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) { GrafPtr thePort ; GetPort( &thePort ) ; - wxYield() ; - SetPort( thePort ) ; + wxSafeYield(win,true); + SetPort( thePort ) ; dc->StartPage(); keepGoing = printout->OnPrintPage(pn); @@ -276,7 +276,7 @@ void wxMacPrintPreview::DetermineScaling(void) m_previewPrintout->SetPPIScreen( 72 , 72 ) ; m_previewPrintout->SetPPIPrinter( 72 , 72 ) ; - m_previewPrintout->SetPageSizeMM( 8 * 25.6 , 11 * 25.6 ) ; + m_previewPrintout->SetPageSizeMM( (int) (8.0 * 25.6), (int) (11.0 * 25.6) ); m_previewPrintout->SetPageSizePixels( 8 * 72 , 11 * 72 ) ; m_pageWidth = 8 * 72 ; m_pageHeight = 11 * 72 ; @@ -295,7 +295,10 @@ void wxMacPrintPreview::DetermineScaling(void) m_pageWidth = x ; m_pageHeight = y ; m_isOk = true ; - + } + else + { + m_isOk = false ; } // At 100%, the page should look about page-size on the screen. // m_previewScale = (float)((float)screenWidth/(float)printerWidth);