diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 9023e66e33..1b22d2eca1 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -806,11 +806,13 @@ protected: virtual void DoSetIndent() = 0; #if wxUSE_DRAG_AND_DROP - virtual wxDataObject* CreateDataObject(const wxVector& formats); + // Helper function which can be used by DoEnableDropTarget() implementations + // in the derived classes: return a composite data object supporting the + // given formats or null if the vector is empty. + static wxDataObject* CreateDataObject(const wxVector& formats); virtual bool DoEnableDropTarget(const wxVector& WXUNUSED(formats)) { return false; } - #endif // wxUSE_DRAG_AND_DROP // Just expand this item assuming it is already shown, i.e. its parent has diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index f1691311ff..952eb2e176 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -1690,6 +1690,7 @@ void wxDataViewCtrlBase::StartEditor(const wxDataViewItem& item, unsigned int co #if wxUSE_DRAG_AND_DROP +/* static */ wxDataObject* wxDataViewCtrlBase::CreateDataObject(const wxVector& formats) { if (formats.empty())