Bug 430323 - Nested folders are not loaded properly
Summary: Nested folders are not loaded properly
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-12 23:33 UTC by Oliver Kellogg
Modified: 2021-02-11 23:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.33.80 (KDE releases 21.03.80)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kellogg 2020-12-12 23:33:01 UTC
SUMMARY

Nested folders are not loaded properly

STEPS TO REPRODUCE
1. Start Umbrello from a console (in order to see stdout/stderr messages).
2. In Logical View create a package.
3. Inside the package create a folder with some object(s) and diagram(s).
4. Save and close.
5. Reopen the saved model.

OBSERVED RESULT

The nested folder is not fully loaded and there are messages at the console:
1) Error: convert_OT_LVT(nestedfolder): internal error - object is not properly nested in folder
2) Warning: Unknown type of umlobject to create: XMI.extension

EXPECTED RESULT

Nested folders shall be loaded including their diagrams.

SOFTWARE/OS VERSIONS
Umbrello: git master @ 526bd5ac
Linux/KDE Plasma: openSuSE Tumbleweed 20201129
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.2
Comment 1 Oliver Kellogg 2020-12-12 23:59:33 UTC
Git commit a81599106a13b6263e32902d05ed0942341509d6 by Oliver Kellogg.
Committed on 12/12/2020 at 23:59.
Pushed by okellogg into branch 'master'.

Fix for 'Nested folders are not loaded properly'

umbrello/model_utils.cpp
- In function convert_OT_LVT case UMLObject::ot_Folder,
  - replace local UMLFolder *f by UMLPackage *p initialized to
    o->asUMLPackage();
  - at do-while loop condition omit call to asUMLFolder().
    Reason: Permit packages as intermediate stores.

umbrello/uml1model/package.cpp
- On processing <packagedElement> and <ownedElement>,
  - before calling Object_Factory::makeObjectFromXMI(), retrieve
    attribute "stereotype" into local stereoID;
  - pass stereoID into call of Object_Factory::makeObjectFromXMI().

M  +3    -3    umbrello/model_utils.cpp
M  +3    -2    umbrello/uml1model/package.cpp

https://invent.kde.org/sdk/umbrello/commit/a81599106a13b6263e32902d05ed0942341509d6