Fix using custom paper format in wxOSX.

Do actually use the custom paper object the code creates.

Closes #16959.
This commit is contained in:
Vadim Zeitlin 2015-04-21 15:46:40 +02:00
parent 3643935097
commit a49a8a3f2f

View File

@ -198,8 +198,18 @@ void wxOSXPrintData::TransferPaperInfoFrom( const wxPrintData &data )
wxString id, name(wxT("Custom paper"));
id.Printf(wxT("wxPaperCustom%dx%d"), papersize.x, papersize.y);
PMPaperCreateCustom(printer, wxCFStringRef( id, wxFont::GetDefaultEncoding() ), wxCFStringRef( name, wxFont::GetDefaultEncoding() ),
papersize.x, papersize.y, &margins, &paper);
if ( PMPaperCreateCustom
(
printer,
wxCFStringRef(id, wxFont::GetDefaultEncoding()),
wxCFStringRef(name, wxFont::GetDefaultEncoding()),
papersize.x, papersize.y,
&margins,
&paper
) )
{
bestPaper = paper;
}
}
if ( bestPaper != kPMNoData )
{