Bug 379776

Summary: Umbrello adds unrelated datatypes on file loading
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: CONFIRMED ---    
Severity: normal CC: okellogg
Priority: NOR    
Version: 2.21.3 (KDE Applications 16.12.3)   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:
Attachments: xmi test case

Description Ralf Habacker 2017-05-13 11:41:06 UTC
Created attachment 105506 [details]
xmi test case

After loading an xmi file umbrello adds additional datatypes not specified in the file.

How to reproduce:
1. Start umbrello
2. load the appended xmi file (it contains only datatypes 'char', 'int', 'float')

What happens:
Umbrello adds additional datatypes 

What is expected:
On loading files Umbrello should not add additional datatypes. Default datatypes  should only be added on creating new documents.
Comment 1 Oliver Kellogg 2020-10-18 10:20:51 UTC
The test.xmi attachment selects <codegenerator language="C++"/>.
There is a latent conflict: When C++ is selected, the user would expect all builtin types of C++ to be available.

The isActive flag of UMLDataType which was introduced by the fix for bug 427532 could be used to address this.
Before loading a file, the builtin types of the active language shall be set to inactive. On loading the file, only the data types loaded shall get the isActive flag set to true.
However, if after loading the user explicitly selects Code -> Active Language "C++" then this has the effect that all C++ builtin types are activated.