Fix printing all pages without dialog prompt in wxOSX.
Do set from and to pages if we're not asking the user to choose them, otherwise nothing is printed at all. See #16294.
This commit is contained in:
parent
bf4426ac10
commit
896e148da5
@ -637,10 +637,21 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
|
||||
}
|
||||
|
||||
// Only set min and max, because from and to will be
|
||||
// set by the user
|
||||
// set by the user if prompted for the print dialog above
|
||||
m_printDialogData.SetMinPage(minPage);
|
||||
m_printDialogData.SetMaxPage(maxPage);
|
||||
|
||||
// Set from and to pages if bypassing the print dialog
|
||||
if ( !prompt )
|
||||
{
|
||||
m_printDialogData.SetFromPage(fromPage);
|
||||
|
||||
if( m_printDialogData.GetAllPages() )
|
||||
m_printDialogData.SetToPage(maxPage);
|
||||
else
|
||||
m_printDialogData.SetToPage(toPage);
|
||||
}
|
||||
|
||||
printout->OnBeginPrinting();
|
||||
|
||||
bool keepGoing = true;
|
||||
|
Loading…
Reference in New Issue
Block a user