Do not assert if not editing a label when calling wxGenericTreeCtrl::EndEditLabel

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Tim Kosse
2014-07-06 10:01:38 +00:00
parent b60b063163
commit b629ff2b9e

View File

@@ -3510,9 +3510,10 @@ wxTextCtrl* wxGenericTreeCtrl::GetEditControl() const
void wxGenericTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item), void wxGenericTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item),
bool discardChanges) bool discardChanges)
{ {
wxCHECK_RET( m_textCtrl, wxT("not editing label") ); if (m_textCtrl)
{
m_textCtrl->EndEdit(discardChanges); m_textCtrl->EndEdit(discardChanges);
}
} }
bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item, bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item,