Bug 382279

Summary: Name change of combined fragment first alternative is not saved
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal Keywords: junior-jobs
Priority: NOR    
Version: 2.22.3 (KDE Applications 17.04.3)   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 2.23.0 (KDE Applications 17.08.0)

Description Ralf Habacker 2017-07-12 16:52:24 UTC
How to reproduce ?
1. start umbrello
2. add a sequence diagram
3. select "combined fragment" from the toolbox
4. Choose "Alternate"
5. press okay and enter text '12345' for the first alternative
6. Double click on the combined fragment
7. change the text in the first edit widget after the "combined fragment" label from '12345' to '12345678'.
8 press okay

What happens ?
The text of the first alternative has not been changed, it still shows '12345'.

What is expected ?
The text of the first alternative should be '12345678'.
Comment 1 Ralf Habacker 2017-07-12 16:54:27 UTC
The problem is located in ClassGeneralPage::apply() in the 

.... 
else if (m_pInstanceWidget) {  
...

case where something like the following text should be added

   if (!o) {
+      if (m_pInstanceWidget->isCombinedFragmentWidget()) {
+           m_pInstanceWidget->setName(name);
+           return;
+      }
Comment 2 Ralf Habacker 2017-08-06 22:00:50 UTC
Git commit 7f327bfaba35ec6960ecc8677f37b705113f43a2 by Ralf Habacker, on behalf of Alessandro Stranieri.
Committed on 06/08/2017 at 22:00.
Pushed by habacker into branch 'Applications/17.08'.

Fix renaming of combined fragment sections' names

The text displayed in the first and second section of a combined fragment
widget are stored in the text variable, which was not set by the
ClassGeneralPage::apply method. This commit fixes this method's logic.

Differential Revision: https://phabricator.kde.org/D6846
FIXED-IN:2.23.0 (KDE Applications 17.08.0)
Related: bug 382282

M  +15   -0    umbrello/dialogs/pages/classgeneralpage.cpp
M  +1    -0    umbrello/dialogs/pages/classgeneralpage.h

https://commits.kde.org/umbrello/7f327bfaba35ec6960ecc8677f37b705113f43a2