]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/property.h
fix wxOS2 build where OpenGL headers are available but there's no wxGlCanvas implemen...
[wxWidgets.git] / include / wx / propgrid / property.h
index 6198c7166a86ab3a4ba7f6114ddf2cba0801eb26..7c329b7d1c4fca1d7980a27f773f37431cc0d586 100644 (file)
@@ -199,11 +199,9 @@ class WXDLLIMPEXP_PROPGRID wxPGCell : public wxObject
 {
 public:
     wxPGCell();
-    wxPGCell( const wxPGCell& other )
+    wxPGCell(const wxPGCell& other)
+        : wxObject(other)
     {
-         m_refData = other.m_refData;
-         if ( m_refData )
-             m_refData->IncRef();
     }
 
     wxPGCell( const wxString& text,
@@ -324,7 +322,7 @@ public:
         data->IncRef();
         variant.SetData(data);
         variant.SetName(it->first);
-        it++;
+        ++it;
         return true;
     }
 
@@ -649,10 +647,8 @@ class WXDLLIMPEXP_PROPGRID wxPGChoiceEntry : public wxPGCell
 public:
     wxPGChoiceEntry();
     wxPGChoiceEntry(const wxPGChoiceEntry& other)
+        : wxPGCell(other)
     {
-         m_refData = other.m_refData;
-         if ( m_refData )
-             m_refData->IncRef();
         m_value = other.m_value;
     }
     wxPGChoiceEntry( const wxString& label,
@@ -996,7 +992,8 @@ public:
 #ifndef SWIG
     void operator= (const wxPGChoices& a)
     {
-        AssignData(a.m_data);
+        if (this != &a)
+            AssignData(a.m_data);
     }
 
     wxPGChoiceEntry& operator[](unsigned int i)
@@ -2359,9 +2356,9 @@ public:
 
     int GetTextExtent( const wxWindow* wnd, const wxFont& font ) const;
 
-protected:
     virtual wxString ValueToString( wxVariant& value, int argFlags ) const;
 
+protected:
     void SetTextColIndex( unsigned int colInd )
         { m_capFgColIndex = (wxByte) colInd; }
     unsigned int GetTextColIndex() const