]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/propgridpagestate.h
fix another logical/physical coords confusion and update the comment to help with...
[wxWidgets.git] / include / wx / propgrid / propgridpagestate.h
index 7831f9cc0b742d0564b019b4a4c7364c17a39fa1..f8953663895c8ecb28f5c468308c89f953587791 100644 (file)
@@ -234,7 +234,8 @@ private:
     } \
     const CLASS& operator=( const CLASS& it ) \
     { \
-        Assign(it); \
+        if (this != &it) \
+            Assign(it); \
         return *this; \
     } \
     CLASS& operator++() { Next(); return *this; } \
@@ -289,6 +290,23 @@ public:
                             const wxPGProperty,
                             const wxPropertyGridPageState)
 
+    /**
+        Additional copy constructor.
+    */
+    wxPropertyGridConstIterator( const wxPropertyGridIterator& other )
+    {
+        Assign(other);
+    }
+
+    /**
+        Additional assignment operator.
+    */
+    const wxPropertyGridConstIterator& operator=( const wxPropertyGridIterator& it )
+    {
+        Assign(it);
+        return *this;
+    }
+
 protected:
 };
 
@@ -342,9 +360,12 @@ public:
 #ifndef SWIG
     const wxPGVIterator& operator=( const wxPGVIterator& it )
     {
-        UnRef();
-        m_pIt = it.m_pIt;
-        m_pIt->IncRef();
+        if (this != &it)
+        {
+            UnRef();
+            m_pIt = it.m_pIt;
+            m_pIt->IncRef();
+        }
         return *this;
     }
 #endif
@@ -636,7 +657,7 @@ protected:
     */
     int HitTestH( int x, int* pSplitterHit, int* pSplitterHitOffset ) const;
 
-    int PrepareToAddItem ( wxPGProperty* property,
+    bool PrepareToAddItem( wxPGProperty* property,
                            wxPGProperty* scheduledParent );
 
     /** If visible, then this is pointer to wxPropertyGrid.