https://bugs.kde.org/show_bug.cgi?id=427532
Oliver Kellogg <okell...@users.sourceforge.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|REPORTED |ASSIGNED --- Comment #1 from Oliver Kellogg <okell...@users.sourceforge.net> --- We cannot remove the previous default data types from the Document (UMLDoc): Imagine having made a large C++ specific model with Active Language C++. Accidentally you change the Active Language to non C++. If the default types were removed from the Document then all references to those types would be left dangling. Changing back to Active Language C++ would not fix the dangling references because new default type objects would be constructed. Therefore, the strategy is as follows: * Class UMLDatatype gets a new flag, isActive, initialized to true by default. * When user changes Active Language, before the new default types are added the existing default types are queried at the Document and their isActive flag is set false. No deallocation of those types is performed. * The function UMLPackage::containedObjects is changed as follows: If a contained object is a UMLDatatype then its isActive flag is queried. If isActive is true then it is not placed into the returned list. * When user changes Active Language back to its original value, the default types of that language are queried at the Document and their isActive flag is restored to true. The existing UMLDatatype objects are reused (no new allocation takes place). * The isActive flag is also saved to and loaded from the <UML:DataType> XMI element. -- You are receiving this mail because: You are watching all bug changes.