Bug 90506 - Classes can be dragged into other classes in list view, freeze
Summary: Classes can be dragged into other classes in list view, freeze
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-29 22:35 UTC by Frank Osterfeld
Modified: 2006-03-22 07:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Osterfeld 2004-09-29 22:35:27 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.4 
OS:                Linux

Using current CVS, KDE 3.3 branch. Qt 3.3.3.

When I try to move items in the list view via drag and drop, this often freezes umbrello.
This happens when I move classes over other classes or when I want to move classes to a package.

A scenario reproducible here:
 
- Open umbrello and create a new file
- add two new classes to the class diagram
- select one of the classes in the list view and drag it over the other class
- drag it around (over the second class), drop it, drag it again...
- sooner or later (mostly sooner), umbrello freezes completely.
Comment 1 Jonathan Riddell 2004-10-12 23:18:22 UTC
Confirmed.  (Thanks for a well written beastie report.)
Comment 2 Oliver Kellogg 2004-11-11 19:05:03 UTC
Try as I might, I cannot confirm this at all using current cvs head.
Comment 3 Jonathan Riddell 2004-11-11 22:36:02 UTC
I can confirm it with current CVS head.

-Create a class on the canvas new_class
-Create a second class on the canvas new_class_1
-In the list view drag the first class over the second
-Freeze
Comment 4 Frank Osterfeld 2004-11-21 14:26:12 UTC
I found out that dropping a parent onto it's own child causes a freeze.
I think that this case is not handled by the drag-and-drop code. You should check whether the dragged object is an "ancestor" of the new parent.
Comment 5 Oliver Kellogg 2004-11-26 16:23:09 UTC
Jonathan Riddell wrote:

> -Create a class on the canvas new_class
> -Create a second class on the canvas new_class_1
> -In the list view drag the first class over the second
> -Freeze

This particular bug was fixed on Oct 13, see e.g.
umllistview.cpp:1.119
Do you mean to say it is still happening?
Comment 6 Jonathan Riddell 2004-11-29 00:32:08 UTC
> Do you mean to say it is still happening? 

Yes, although it doesn't happen every time.

if it doesn't happen one time drag the inside class back onto the folder then drag it onto the other class again.  It will happen.  Maddening.

Comment 7 Frank Osterfeld 2004-11-29 10:53:16 UTC
It doesn't freeze anymore here just by dragging (without dropping the item).
Obviously there are fewer freezes now, but they are not completely gone.
What still freezes umbrello every time here is:

- create class_1 and class_2
- move class_1 into class_2 (class_1 is child of class_2 now)
- try to move class_2 into class_1 
- freeze when dropping class_2

As mentioned above, it seems that the drag drop code doesn't handle this case (moving parent into own subtree) properly: moving the corresponding nodes in the data model causes an infinite loop (you got a cycle in the tree then I guess). So dnd code in UMLListView should prevent this.
Comment 8 Oliver Kellogg 2006-03-22 07:42:59 UTC
This was fixed sometime before 1.5.0