Bug 379776 - Umbrello adds unrelated datatypes on file loading
Summary: Umbrello adds unrelated datatypes on file loading
Status: CONFIRMED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.21.3 (KDE Applications 16.12.3)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-13 11:41 UTC by Ralf Habacker
Modified: 2020-10-18 10:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
xmi test case (5.28 KB, application/x-uml)
2017-05-13 11:41 UTC, Ralf Habacker
Details

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