Bug 403853 - Copy and paste of interface in component diagram does not update the displayed name
Summary: Copy and paste of interface in component diagram does not update the displaye...
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.27.1 (KDE Applications 18.12.1)
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-02 10:52 UTC by Ralf Habacker
Modified: 2019-02-03 16:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.27.2 (KDE Applications 18.12.2)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2019-02-02 10:52:39 UTC
STEPS TO REPRODUCE
1. start umbrello
2. add component diagram
3. add interface
4. select, copy and paste this interface

OBSERVED RESULT
The displayed name of the copied interface does not match the one in the properties dialog and the tree view 

EXPECTED RESULT
The displayed name of the copied interface should match the one in the properties dialog and the tree view 


SOFTWARE/OS VERSIONS
Windows: 7
KDE Frameworks Version 4.14
Qt Version: 4.8.7
Comment 1 Ralf Habacker 2019-02-02 12:22:39 UTC
The copy and paste implementation uses the regular functions to load and save xmi files.
When copying, the selected UML objects and widgets are written to a memory xml stream and inserted into new UML objects and widgets. The original name of the UML object is also reused. Since the inserted UML object gets a new name, there is code somewhere to perform this adaptation, but it is not applied to the inserted widgets and leads to the problem described.
Comment 2 Ralf Habacker 2019-02-02 13:56:05 UTC
Git commit 48be64aa24851878e466de7a858887c1cde5aa61 by Ralf Habacker.
Committed on 02/02/2019 at 13:52.
Pushed by habacker into branch 'Applications/18.12'.

Fix 'Copy and paste of interface in component diagram does not update the displayed name'

We need to override WidgetBase::setUMLObject() to propagate the new object
name to the floating text widget holding the interface name.
FIXED-IN:2.27.2 (KDE Applications 18.12.2)

M  +12   -0    umbrello/umlwidgets/classifierwidget.cpp
M  +1    -0    umbrello/umlwidgets/classifierwidget.h

https://commits.kde.org/umbrello/48be64aa24851878e466de7a858887c1cde5aa61
Comment 3 Gerhard Landsmann 2019-02-03 16:26:19 UTC
PLEASE GET ME OFF THE DISTRIBUTION!!!


Am 02.02.19 um 14:56 schrieb Ralf Habacker:
> https://bugs.kde.org/show_bug.cgi?id=403853
>
> Ralf Habacker <ralf.habacker@freenet.de> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>     Version Fixed In|                            |2.27.2 (KDE Applications
>                     |                            |18.12.2)
>           Resolution|---                         |FIXED
>        Latest Commit|                            |https://commits.kde.org/umb
>                     |                            |rello/48be64aa24851878e466d
>                     |                            |e7a858887c1cde5aa61
>               Status|REPORTED                    |RESOLVED
>
> --- Comment #2 from Ralf Habacker <ralf.habacker@freenet.de> ---
> Git commit 48be64aa24851878e466de7a858887c1cde5aa61 by Ralf Habacker.
> Committed on 02/02/2019 at 13:52.
> Pushed by habacker into branch 'Applications/18.12'.
>
> Fix 'Copy and paste of interface in component diagram does not update the
> displayed name'
>
> We need to override WidgetBase::setUMLObject() to propagate the new object
> name to the floating text widget holding the interface name.
> FIXED-IN:2.27.2 (KDE Applications 18.12.2)
>
> M  +12   -0    umbrello/umlwidgets/classifierwidget.cpp
> M  +1    -0    umbrello/umlwidgets/classifierwidget.h
>
> https://commits.kde.org/umbrello/48be64aa24851878e466de7a858887c1cde5aa61
>
Comment 4 Gerhard Landsmann 2019-02-03 16:26:21 UTC
PLEASE GET ME OFF THE DISTRIBUTION!!!


Am 02.02.19 um 13:22 schrieb Ralf Habacker:
> https://bugs.kde.org/show_bug.cgi?id=403853
>
> --- Comment #1 from Ralf Habacker <ralf.habacker@freenet.de> ---
> The copy and paste implementation uses the regular functions to load and save
> xmi files.
> When copying, the selected UML objects and widgets are written to a memory xml
> stream and inserted into new UML objects and widgets. The original name of the
> UML object is also reused. Since the inserted UML object gets a new name, there
> is code somewhere to perform this adaptation, but it is not applied to the
> inserted widgets and leads to the problem described.
>