For needs of wxPython bindings, (re)added a version of RegisterEditorClass() that accepts a custom name for editor.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -917,7 +917,14 @@ public:
|
|||||||
Pointer to the editor class instance that should be used.
|
Pointer to the editor class instance that should be used.
|
||||||
*/
|
*/
|
||||||
static wxPGEditor* RegisterEditorClass( wxPGEditor* editor,
|
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
|
#endif
|
||||||
|
|
||||||
/** Resets all colours to the original system values.
|
/** Resets all colours to the original system values.
|
||||||
|
@@ -5083,15 +5083,18 @@ void wxPropertyGrid::OnCaptureChange( wxMouseCaptureChangedEvent& WXUNUSED(event
|
|||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
// noDefCheck = true prevents infinite recursion.
|
// noDefCheck = true prevents infinite recursion.
|
||||||
wxPGEditor* wxPropertyGrid::RegisterEditorClass( wxPGEditor* editorClass,
|
wxPGEditor* wxPropertyGrid::DoRegisterEditorClass( wxPGEditor* editorClass,
|
||||||
bool noDefCheck )
|
const wxString& editorName,
|
||||||
|
bool noDefCheck )
|
||||||
{
|
{
|
||||||
wxASSERT( editorClass );
|
wxASSERT( editorClass );
|
||||||
|
|
||||||
if ( !noDefCheck && wxPGGlobalVars->m_mapEditorClasses.empty() )
|
if ( !noDefCheck && wxPGGlobalVars->m_mapEditorClasses.empty() )
|
||||||
RegisterDefaultEditors();
|
RegisterDefaultEditors();
|
||||||
|
|
||||||
wxString name = editorClass->GetName();
|
wxString name = editorName;
|
||||||
|
if ( name.length() == 0 )
|
||||||
|
name = editorClass->GetName();
|
||||||
|
|
||||||
// Existing editor under this name?
|
// Existing editor under this name?
|
||||||
wxPGHashMapS2P::iterator vt_it = wxPGGlobalVars->m_mapEditorClasses.find(name);
|
wxPGHashMapS2P::iterator vt_it = wxPGGlobalVars->m_mapEditorClasses.find(name);
|
||||||
|
Reference in New Issue
Block a user