From fd2aea035249c6b0590d228d39f856e54fef03f0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 May 2020 20:03:32 +0200 Subject: [PATCH] Log wxEVT_DATAVIEW_ITEM_BEGIN_DRAG in the sample Show when an attempt to start dragging an item is made, to be able to compare the behaviour under different platforms easily. --- samples/dataview/dataview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 3b840491ce..c959eb5f52 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -1262,6 +1262,7 @@ void MyFrame::OnBeginDrag( wxDataViewEvent &event ) // only allow drags for item, not containers if (m_music_model->IsContainer( item ) ) { + wxLogMessage("Forbidding starting dragging"); event.Veto(); return; } @@ -1271,6 +1272,8 @@ void MyFrame::OnBeginDrag( wxDataViewEvent &event ) obj->SetText( node->m_title ); event.SetDataObject( obj ); event.SetDragFlags(wxDrag_AllowMove); // allows both copy and move + + wxLogMessage("Starting dragging \"%s\"", node->m_title); } void MyFrame::OnDropPossible( wxDataViewEvent &event )