]> git.saurik.com Git - wxWidgets.git/commitdiff
For needs of wxPython bindings, (re)added a version of RegisterEditorClass() that...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 12 Jun 2009 13:49:59 +0000 (13:49 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 12 Jun 2009 13:49:59 +0000 (13:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index d0060f7cfa0536eb84b6aec2a3c535db62a6aad9..29d257b336577747c99f8524c37bedbb4cd45012 100644 (file)
@@ -917,7 +917,14 @@ public:
         Pointer to the editor class instance that should be used.
     */
     static wxPGEditor* RegisterEditorClass( wxPGEditor* editor,
-                                            bool noDefCheck = false );
+                                            bool noDefCheck = false )
+    {
+        return DoRegisterEditorClass(editor, wxEmptyString, noDefCheck);
+    }
+
+    static wxPGEditor* DoRegisterEditorClass( wxPGEditor* editorClass,
+                                              const wxString& editorName,
+                                              bool noDefCheck = false );
 #endif
 
     /** Resets all colours to the original system values.
index 9dd4764c2254d149b9336814bd4826d654f884b6..83462b36a5f4f2fbea3ea53fa2b981c555ac3739 100644 (file)
@@ -5083,15 +5083,18 @@ void wxPropertyGrid::OnCaptureChange( wxMouseCaptureChangedEvent& WXUNUSED(event
 // -----------------------------------------------------------------------
 
 // noDefCheck = true prevents infinite recursion.
-wxPGEditor* wxPropertyGrid::RegisterEditorClass( wxPGEditor* editorClass,
-                                                 bool noDefCheck )
+wxPGEditor* wxPropertyGrid::DoRegisterEditorClass( wxPGEditor* editorClass,
+                                                   const wxString& editorName,
+                                                   bool noDefCheck )
 {
     wxASSERT( editorClass );
 
     if ( !noDefCheck && wxPGGlobalVars->m_mapEditorClasses.empty() )
         RegisterDefaultEditors();
 
-    wxString name = editorClass->GetName();
+    wxString name = editorName;
+    if ( name.length() == 0 )
+        name = editorClass->GetName();
 
     // Existing editor under this name?
     wxPGHashMapS2P::iterator vt_it = wxPGGlobalVars->m_mapEditorClasses.find(name);