Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Wt/WAbstractProxyModel.C
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ void WAbstractProxyModel::dropEvent(const WDropEvent& e, DropAction action,
sourceModel_->dropEvent(e, action, sourceRow, sourceColumn, sourceParent);
}

void WAbstractProxyModel::dropEvent(const WDropEvent &e, DropAction action,
const WModelIndex &index, Wt::Side side) {
sourceModel_->dropEvent(e, action, mapToSource(index), side);
}

void *WAbstractProxyModel::toRawIndex(const WModelIndex& index) const
{
return sourceModel_->toRawIndex(mapToSource(index));
Expand Down
8 changes: 8 additions & 0 deletions src/Wt/WAbstractProxyModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ class WT_API WAbstractProxyModel : public WAbstractItemModel
int row, int column, const WModelIndex& parent)
override;

/*! \brief Handles a drop event.
*
* The default proxy implementation maps the given index to the source model
* , and forwards the dropEvent call to the source model.
*/
virtual void dropEvent(const WDropEvent &e, DropAction action,
const WModelIndex &index, Wt::Side side) override;

/*! \brief Converts a model index to a raw pointer that remains valid
* while the model's layout is changed.
*
Expand Down