Bug 95252

Summary: Deleting a class that contains another class leaves the model inconsistent
Product: [Applications] umbrello Reporter: Marcos Mayorga <drmay_en>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:

Description Marcos Mayorga 2004-12-16 11:17:08 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages

If you have a class 'b' contained into a class 'a' in the tree view, and if you ar seeing them in a class diagram, when you delete class 'a' in the tree view, the class 'b' remains in the diagram, which is the expected behaviour, BUT, it has dissapeared in the tree view.
The expected behaviour is that class 'b' should now belong to the closest package in the hierarchy.
Comment 1 Jonathan Riddell 2004-12-19 19:35:59 UTC
If you save and load the file the sub-class disappears from any diagrams it is in.
Comment 2 Oliver Kellogg 2004-12-20 20:37:38 UTC
Marcos Mayorga wrote:
>
> The expected behaviour is that class 'b' should now belong
> to the closest package in the hierarchy.

Really? That seems counterintuitive. When deleting a folder
or directory, usually all the contents disappear too.
Comment 3 Marcos Mayorga 2004-12-20 21:51:07 UTC
Yes, but when speaking about classes I rather see the deletion in cascade could result in the loose of useful work, because when a class 'belongs' to another, it means it in terms of scope or visibility, and not in terms of functionality.
example:
class line {
 class point{};
};

If I decide not to use lines but it is better to use polylines, in the model I don't want point to dissapear, because I'm going to need it in my new polyline class


Comment 4 Oliver Kellogg 2004-12-22 19:34:23 UTC
CVS commit by okellogg: 

On deleting a package (or class) in the list view, move contained objects outside.
BUG:95252


  M +4 -2      ChangeLog   1.47
  M +48 -36    umbrello/umllistview.cpp   1.133
  M +5 -5      umbrello/umllistview.h   1.52