Allow a NULL editor and/or renderer to be passed to RegisterDataType
and not crash when it tries to get them later. (If NULL it falls back to the grid's default like it used to before the type registry was added.) Added wxTE_PROCESS_TAB to wxTextCtrl style for MSW. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -502,7 +502,8 @@ void wxGridCellTextEditor::Create(wxWindow* parent,
|
||||
m_control = new wxTextCtrl(parent, id, wxEmptyString,
|
||||
wxDefaultPosition, wxDefaultSize
|
||||
#if defined(__WXMSW__)
|
||||
, wxTE_MULTILINE | wxTE_NO_VSCROLL | wxTE_AUTO_SCROLL
|
||||
, wxTE_PROCESS_TAB | wxTE_MULTILINE |
|
||||
wxTE_NO_VSCROLL | wxTE_AUTO_SCROLL
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -2417,6 +2418,7 @@ int wxGridTypeRegistry::FindOrCloneDataType(const wxString& typeName)
|
||||
wxGridCellRenderer* wxGridTypeRegistry::GetRenderer(int index)
|
||||
{
|
||||
wxGridCellRenderer* renderer = m_typeinfo[index]->m_renderer;
|
||||
if (renderer)
|
||||
renderer->IncRef();
|
||||
return renderer;
|
||||
}
|
||||
@@ -2424,6 +2426,7 @@ wxGridCellRenderer* wxGridTypeRegistry::GetRenderer(int index)
|
||||
wxGridCellEditor* wxGridTypeRegistry::GetEditor(int index)
|
||||
{
|
||||
wxGridCellEditor* editor = m_typeinfo[index]->m_editor;
|
||||
if (editor)
|
||||
editor->IncRef();
|
||||
return editor;
|
||||
}
|
||||
|
Reference in New Issue
Block a user