]> git.saurik.com Git - wxWidgets.git/commitdiff
Call CalculatePaperSizeFromId when SetPrintData or the assignment
authorRobin Dunn <robin@alldunn.com>
Sat, 29 Jan 2005 01:06:10 +0000 (01:06 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 29 Jan 2005 01:06:10 +0000 (01:06 +0000)
operator is used.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cmndata.h
src/common/cmndata.cpp

index 95f2b7dc142183a1e1b3ad0d292593717cc4ef32..a33f276da2d5bffba3f7cae831017a28636f2bc5 100644 (file)
@@ -431,7 +431,7 @@ public:
     wxPageSetupDialogData& operator=(const wxPrintData& data);
 
     wxPrintData& GetPrintData() { return m_printData; }
-    void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
+    void SetPrintData(const wxPrintData& printData);
 
 private:
     wxSize          m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
index bb44120bcf56bd152efe1d73d06fef698e42ff39..d34be064acd6bdfc447d7a494d92d248feb71f3b 100644 (file)
@@ -610,6 +610,7 @@ wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPageSetupDialogD
 wxPageSetupDialogData& wxPageSetupDialogData::operator=(const wxPrintData& data)
 {
     m_printData = data;
+    CalculatePaperSizeFromId();
 
     return *this;
 }
@@ -661,6 +662,12 @@ void wxPageSetupDialogData::SetPaperSize(wxPaperSize id)
     CalculatePaperSizeFromId();
 }
 
+void wxPageSetupDialogData::SetPrintData(const wxPrintData& printData)
+{
+    m_printData = printData;
+    CalculatePaperSizeFromId();    
+}
+
 // Use paper size defined in this object to set the wxPrintData
 // paper id
 void wxPageSetupDialogData::CalculateIdFromPaperSize()