end label editing if the control loses focus (slightly modified patch 1084592)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-12-20 01:23:52 +00:00
parent ca1ecff429
commit d35dce3a2e
2 changed files with 28 additions and 2 deletions

View File

@@ -340,7 +340,11 @@ public:
// edited simultaneously)
wxTextCtrl* GetEditControl() const;
// end editing and accept or discard the changes to item label
void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false);
void EndEditLabel(const wxTreeItemId& WXUNUSED(item),
bool discardChanges = false)
{
DoEndEditLabel(discardChanges);
}
// sorting
// this function is called to compare 2 items and should return -1, 0
@@ -446,6 +450,10 @@ protected:
// refresh a single item
void RefreshItem(const wxTreeItemId& item);
// end edit label
void DoEndEditLabel(bool discardChanges = false);
// data used only while editing the item label:
wxTextCtrl *m_textCtrl; // text control in which it is edited
wxTreeItemId m_idEdited; // the item being edited