Send wxEVT_DATAVIEW_ITEM_EDITING_DONE after cancelling too
Previously this event was not sent at all if editing the item was cancelled, e.g. by pressing Esc. Do send it now from the generic implementation and update the sample to show this event. See #17835.
This commit is contained in:
@@ -1227,7 +1227,11 @@ void MyFrame::OnEditingStarted( wxDataViewEvent &event )
|
||||
void MyFrame::OnEditingDone( wxDataViewEvent &event )
|
||||
{
|
||||
wxString title = m_music_model->GetTitle( event.GetItem() );
|
||||
wxLogMessage( "wxEVT_DATAVIEW_ITEM_EDITING_DONE, Item: %s", title );
|
||||
wxLogMessage("wxEVT_DATAVIEW_ITEM_EDITING_DONE, Item: %s, new value %s",
|
||||
title,
|
||||
event.IsEditCancelled()
|
||||
? wxString("unavailable because editing was cancelled")
|
||||
: event.GetValue().GetString());
|
||||
}
|
||||
|
||||
void MyFrame::OnExpanded( wxDataViewEvent &event )
|
||||
|
Reference in New Issue
Block a user