Bug #1310
WTableview Drop operation is incomplete
| Status: | Closed | Start date: | 05/29/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | 05/29/2012 | |
| Assignee: | Pieter Libin | % Done: | 0% | |
| Category: | - | |||
| Target version: | 3.2.2 |
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.
History
#1 Updated by Koen Deforche about 1 year ago
- Status changed from New to Assigned
- 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
#2 Updated by Pieter Libin about 1 year ago
- File 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.
#3 Updated by Pieter Libin about 1 year ago
- Status changed from Assigned to Resolved
#4 Updated by Koen Deforche 12 months ago
- Status changed from Resolved to Closed
Released in Wt 3.2.2