Bug 144537 - RMB LogicalView->New->Class in treeview creates TWO classes
Summary: RMB LogicalView->New->Class in treeview creates TWO classes
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-22 22:59 UTC by Oliver Kellogg
Modified: 2013-11-06 17:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.0.0


Attachments
Trace of first invocation of UMLListView::addNewItem() (3.71 KB, text/plain)
2007-04-22 23:01 UTC, Oliver Kellogg
Details
Trace of second invocation of UMLListView::addNewItem() (3.33 KB, text/plain)
2007-04-22 23:02 UTC, Oliver Kellogg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kellogg 2007-04-22 22:59:41 UTC
Version:           trunk r656843 (using KDE Devel)
Installed from:    Compiled sources

Pressing the right mouse button on the Logical View at the left
panel (tree view) and selecting New->Class creates TWO classes
instead of one.  The second class is nested within the first.

I am using the Qt-4.3.0beta from qt-copy and kdelibs trunk
of today (r656814) but first observed this behavior
already many weeks ago.
Comment 1 Oliver Kellogg 2007-04-22 23:01:58 UTC
Created attachment 20355 [details]
Trace of first invocation of UMLListView::addNewItem()
Comment 2 Oliver Kellogg 2007-04-22 23:02:43 UTC
Created attachment 20356 [details]
Trace of second invocation of UMLListView::addNewItem()
Comment 3 Oliver Kellogg 2007-05-11 06:50:25 UTC
SVN commit 663381 by okellogg:

fixed by Sharan in commit 663342
BUG:144537


 M  +4 -3      ChangeLog.2  
 M  +2 -0      THANKS  
 M  +8 -1      umbrello/umldoc.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog.2 #663380:663381
@@ -2,6 +2,9 @@
 
 * Bugs/wishes from http://bugs.kde.org:
 * Turn off header/footer and page numbers when printing (69113)
+* Code generation and undo/redo take up too much memory (72644)
+  - Use the KUndoStack derived from QT4 QUndoStack in order to manage commands.
+  - Commands are stored in cmds folder.
 * Recursively scan source files when reverse engineering (109157)
 * Implement the UML 2.0 standard (115269)
   - Sequence Diagram
@@ -24,7 +27,5 @@
         * Central buffer nodes.
         * Data stores nodes.
         * Input / Output / Constant Pins.
+* RMB LogicalView->New->Class in treeview creates TWO classes (144537)
 
-* Code generation and undo/redo take up too much memory (72644)
-  - Use the KUndoStack derived from QT4 QUndoStack in order to manage commands.
-  - Commands are stored in cmds folder.
--- trunk/KDE/kdesdk/umbrello/THANKS #663380:663381
@@ -64,6 +64,7 @@
 Ivan Porres <iporres @abo.fi>
 Maciej Puzio <maciek @work.swmed.edu>
 Ruediger Ranft <kdebugs @rranft1.mail.htwm.de>
+Sharan Rao <sharanrao @gmail.com>
 John Ratke <jratke @comcast.net>
 Vincent Ricard <magic @magicninja.org>
 Daniel Richard G. <skunk @iskunk.org>
@@ -77,6 +78,7 @@
 Sebastian Stein <seb.stein @gmx.de>
 Andrew Sutton <asutton @cs.kent.edu>
 Tanuj <tagrawal @hss.hns.com>
+Tonton <tonton-lists @team1664.org>
 Brian Thomas <brian.thomas @gsfc.nasa.gov>
 Ferenc Veres <lion @netngine.hu>
 Jean Vittor <jean.vittor @wanadoo.fr>
--- trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp #663380:663381
@@ -1290,8 +1290,15 @@
 
     // Save stereotypes and toplevel datatypes first so that upon loading
     // they are known first.
+    // There is a bug causing duplication of the same stereotype in m_stereoList.
+    // As a workaround, we use a string list to memorize which stereotype has been saved.
+    QStringList stereoNames;
     for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) {
-        s->saveToXMI(doc, ownedNS);
+        QString stName = s->getName();
+        if (!stereoNames.contains(stName)) {
+            s->saveToXMI(doc, ownedNS);
+            stereoNames.append(stName);
+        }
     }
     for (int i = 0; i < Uml::N_MODELTYPES; i++) {
         m_root[i]->saveToXMI(doc, ownedNS);
Comment 4 Ralf Habacker 2013-11-06 17:35:10 UTC
set version-fixed-in from 4.0.0 changelog