Avoid resetting size if paper id not found

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2009-05-20 13:18:21 +00:00
parent 3cc5704485
commit 331dbb617f

View File

@@ -524,9 +524,12 @@ void wxPageSetupDialogData::CalculatePaperSizeFromId()
wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId()); wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId());
// sz is in 10ths of a mm, while paper size is in mm if (sz != wxSize(0, 0))
m_paperSize.x = sz.x / 10; {
m_paperSize.y = sz.y / 10; // sz is in 10ths of a mm, while paper size is in mm
m_paperSize.x = sz.x / 10;
m_paperSize.y = sz.y / 10;
}
} }
#endif // wxUSE_PRINTING_ARCHITECTURE #endif // wxUSE_PRINTING_ARCHITECTURE