Applied [ 1867939 ] fixes for wxTreeCtrl crashes when exiting from label editing to wxListCtrl as well and made code more similar to wxTreeCtrl' code doing the same

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2008-01-10 14:58:21 +00:00
parent d0e2c75cfa
commit a8a8915453
2 changed files with 51 additions and 51 deletions

View File

@@ -92,7 +92,7 @@ class WXDLLEXPORT wxTreeTextCtrl: public wxTextCtrl
public:
wxTreeTextCtrl(wxGenericTreeCtrl *owner, wxGenericTreeItem *item);
void EndEdit(bool discardChanges = false);
void EndEdit( bool discardChanges );
const wxGenericTreeItem* item() const { return m_itemEdited; }
@@ -102,7 +102,7 @@ protected:
void OnKillFocus( wxFocusEvent &event );
bool AcceptChanges();
void Finish( bool setfocus = true );
void Finish( bool setfocus );
private:
wxGenericTreeCtrl *m_owner;
@@ -392,7 +392,7 @@ void wxTreeTextCtrl::EndEdit(bool discardChanges)
{
m_owner->OnRenameCancelled(m_itemEdited);
Finish();
Finish( true );
}
else
{
@@ -400,7 +400,7 @@ void wxTreeTextCtrl::EndEdit(bool discardChanges)
AcceptChanges();
// Even if vetoed, close the control (consistent with MSW)
Finish();
Finish( true );
}
}