]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/printmac.cpp
Return smaller images for wxART_MENU/BUTTON under OS X.
[wxWidgets.git] / src / osx / core / printmac.cpp
index 53cf637057fb482ad70817dc5467efa5a23f21e8..8d43808e5e92f042ffe735dac25a7afce837c77e 100644 (file)
@@ -448,6 +448,19 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
         return false;
 
     printout->SetIsPreview(false);
+
+    // Get some parameters from the printout, if defined
+    int fromPage, toPage;
+    int minPage, maxPage;
+    printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage);
+
+    if (maxPage == 0) return false;
+
+    // Only set min and max, because from and to will be
+    // set by the user
+    m_printDialogData.SetMinPage(minPage);
+    m_printDialogData.SetMaxPage(maxPage);
+
     if (m_printDialogData.GetMinPage() < 1)
         m_printDialogData.SetMinPage(1);
     if (m_printDialogData.GetMaxPage() < 1)
@@ -502,22 +515,6 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
 
     printout->OnPreparePrinting();
 
-    // Get some parameters from the printout, if defined
-    int fromPage, toPage;
-    int minPage, maxPage;
-    printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage);
-
-    if (maxPage == 0)
-    {
-        wxEndBusyCursor();
-        return false;
-    }
-
-    // Only set min and max, because from and to have been
-    // set by the user
-    m_printDialogData.SetMinPage(minPage);
-    m_printDialogData.SetMaxPage(maxPage);
-
     printout->OnBeginPrinting();
 
     bool keepGoing = true;