[Uml-devel] Fix for ListView Drag & Drop

Gustavo Madrigal linux_news at nextphere.com
Tue Jan 15 18:34:02 UTC 2002


When the scrollbar appears on the ListView the drag and drop doesn't work 
properly (It doesn't allow to drop the item). This is due to the lack of 
coordinate translation between event's position and listview's coordinates.

The Fix,

In uml-1.0.3/uml/mylistview.cpp change:

line 445:
	MyListViewItem * item = (MyListViewItem*)itemAt(event -> pos());

replace it with:
QPoint pt =  ((MyListView*)this)->contentsToViewport(event -> pos());
	MyListViewItem * item = (MyListViewItem*)itemAt(pt);

For the development version change line 474 (I have and old cvs snapshot, 2 
weeks old)

Also, I have fixed the usecase properties call from the listview and I am 
working on  Drag&Drop of multiple items and Copy&Paste between 
several instances of the uml application (Right now only empty folders can be 
pasted). I will be sending this stuff to Paul Hensgen for him to considerate.

Regards,

Gustavo Madrigal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-diff
Size: 213 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20020115/52e16c75/attachment.bin>


More information about the umbrello-devel mailing list