]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid resetting size if paper id not found
authorJulian Smart <julian@anthemion.co.uk>
Wed, 20 May 2009 13:18:21 +0000 (13:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 20 May 2009 13:18:21 +0000 (13:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/cmndata.cpp

index 2fd075f47e1e96bb8701206654e195de79795d9f..0a55186a496c9628cad2dbcf790afeb0c20adced 100644 (file)
@@ -524,9 +524,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