]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/regiong.cpp
Enable the correct code making sure that subwindows will always receive a wxSizeEvent...
[wxWidgets.git] / src / generic / regiong.cpp
index 845df56ce07041a924712cbe9f8a97a8a38fba28..d9ee1d95dea5c6d9a6a5e0c3678551eacfe634f6 100644 (file)
@@ -176,12 +176,12 @@ protected:
 // wxRegionRefData
 // ========================================================================
 
-class wxRegionRefData : public wxObjectRefData,
+class wxRegionRefData : public wxGDIRefData,
                         public REGION
 {
 public:
     wxRegionRefData()
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION()
     {
         size = 1;
@@ -194,7 +194,7 @@ public:
     }
 
     wxRegionRefData(const wxPoint& topLeft, const wxPoint& bottomRight)
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION()
     {
         rects = (BOX*)malloc(sizeof(BOX));
@@ -208,7 +208,7 @@ public:
     }
 
     wxRegionRefData(const wxRect& rect)
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION(rect)
     {
         rects = (BOX*)malloc(sizeof(BOX));
@@ -216,7 +216,7 @@ public:
     }
 
     wxRegionRefData(const wxRegionRefData& refData)
-        : wxObjectRefData(),
+        : wxGDIRefData(),
           REGION()
     {
         size = refData.size;
@@ -274,14 +274,16 @@ wxRegionGeneric::wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRi
 void wxRegionGeneric::Clear()
 {
     UnRef();
+    if (!m_refData)
+        m_refData = new wxRegionRefData(wxRect(0,0,0,0));
 }
 
-wxObjectRefData *wxRegionGeneric::CreateRefData() const
+wxGDIRefData *wxRegionGeneric::CreateGDIRefData() const
 {
     return new wxRegionRefData;
 }
 
-wxObjectRefData *wxRegionGeneric::CloneRefData(const wxObjectRefData *data) const
+wxGDIRefData *wxRegionGeneric::CloneGDIRefData(const wxGDIRefData *data) const
 {
     return new wxRegionRefData(*(wxRegionRefData *)data);
 }