From a25a317699d605547010b3aed6c25471594f183b Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 20 May 2009 13:18:11 +0000 Subject: [PATCH] Avoid resetting size if paper id not found git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@60700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/cmndata.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 0c9a9711be..d83d906a85 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -649,9 +649,12 @@ void wxPageSetupDialogData::CalculatePaperSizeFromId() wxSize sz = wxThePrintPaperDatabase->GetSize(m_printData.GetPaperId()); - // 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; + if (sz != wxSize(0, 0)) + { + // 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