Bug #1310

WTableview Drop operation is incomplete

Added by Anonymous about 1 year ago. Updated 12 months ago.

Status:ClosedStart date:05/29/2012
Priority:NormalDue 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.

bug1310.diff Magnifier (2.32 KB) Pieter Libin, 06/13/2012 10:18 am

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

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

Also available in: Atom PDF