Bug #1310
closedWTableview Drop operation is incomplete
0%
Description
I created a custom derived WTableView with a WStandarditemmodel. I made all items 'drop aware' by enabling drop operations for each item and dropEvent was overridden by a custom method (It is almost the drag and drop treeview example from the documentation page). If a drop is detected dropEvent will be called and Wt::WDropEvent& event has correct information about the drag and drop source. But Wt::WModelIndex& target has no information about the drop item at all. If I go one method call back in the stack frame I see void void WTableView::onDropEvent(int renderedRow, int columnId, std::string sourceId, std::string mimeType, WMouseEvent event) was called. All arguments have useful values except rendered row which is always --1. So no model index can be calculated and I never find out on which item the drop operation took place. If I change to a WTreeView I experience correct behaviour. But in my case I can't change my view to a treeview.
Files
Updated by Koen Deforche over 12 years ago
- Status changed from New to InProgress
- Assignee changed from Koen Deforche to Pieter Libin
- Target version changed from 3.2.0 to 3.2.2
Pieter,
Can you verify this? If it is a problem it is because renderedRow should not be --1.
Regards,
koen
Updated by Pieter Libin over 12 years ago
- File bug1310.diff bug1310.diff added
The issue can be reproduced by applying the attached patch (bug1310.diff), running the treeview-dragdrop example and dragging a row from the right table to the left table.
Updated by Pieter Libin over 12 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche over 12 years ago
- Status changed from Resolved to Closed
Released in Wt 3.2.2