Bug 95252 - Deleting a class that contains another class leaves the model inconsistent
Summary: Deleting a class that contains another class leaves the model inconsistent
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-16 11:17 UTC by Marcos Mayorga
Modified: 2004-12-22 19:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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