]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed wxPropertyGridManager::CreatePropertyGrid(), corrected documentation about...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 29 Jan 2009 16:09:46 +0000 (16:09 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 29 Jan 2009 16:09:46 +0000 (16:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/manager.h
interface/wx/propgrid/manager.h
src/propgrid/manager.cpp

index c93c669420168e4f24c5b91c33c34909208ace2a..de264eecae932fb2f900ece5edae93bf29a8f811 100644 (file)
@@ -607,8 +607,12 @@ protected:
     // Subclassing helpers
     //
 
-    /** Creates property grid for the manager. Override to use subclassed
-        wxPropertyGrid.
+    /**
+        Creates property grid for the manager. Reimplement in derived class to
+        use subclassed wxPropertyGrid. However, if you you do this then you
+        must also use the two-step construction (ie. default constructor and
+        Create() instead of constructor with arguments) when creating the
+        manager.
     */
     virtual wxPropertyGrid* CreatePropertyGrid() const;
 
index 1b2e3a14cda229549e47d839bb3865bf05921740..f867108b363a02a73c83775fe240e48253eadc73 100644 (file)
@@ -463,8 +463,11 @@ protected:
     //
 
     /**
-        Creates property grid for the manager.
-        Override to use subclassed wxPropertyGrid.
+        Creates property grid for the manager. Reimplement in derived class to
+        use subclassed wxPropertyGrid. However, if you you do this then you
+        must also use the two-step construction (ie. default constructor and
+        Create() instead of constructor with arguments) when creating the
+        manager.
     */
     virtual wxPropertyGrid* CreatePropertyGrid() const;
 };
index 27f4e81ac793ecb65fa2f40314fe8d9caaa48152..72c53ff64fbc2838fc8533fbd1ccc85467264c21 100644 (file)
@@ -281,6 +281,8 @@ bool wxPropertyGridManager::Create( wxWindow *parent,
                                     long style,
                                     const wxString& name )
 {
+    if ( !m_pPropGrid )
+        m_pPropGrid = CreatePropertyGrid();
 
     bool res = wxPanel::Create( parent, id, pos, size,
                                 (style&0xFFFF0000)|wxWANTS_CHARS,
@@ -298,8 +300,7 @@ bool wxPropertyGridManager::Create( wxWindow *parent,
 void wxPropertyGridManager::Init1()
 {
 
-    //m_pPropGrid = NULL;
-    m_pPropGrid = CreatePropertyGrid();
+    m_pPropGrid = NULL;
 
 #if wxUSE_TOOLBAR
     m_pToolbar = NULL;