Bug 113748 - parameter types don't show up until diagram is reloaded
Summary: parameter types don't show up until diagram is reloaded
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-03 00:19 UTC by Jonathan Riddell
Modified: 2005-11-05 19:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Riddell 2005-10-03 00:19:29 UTC
Version:           1.4.90 (using KDE 3.4.2, Kubuntu Package 4:3.4.2-0ubuntu7 )
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-9-386

Add a class
Go to add a new operation
Go to add a new parameter
Give the paramater a type that isn't already used in the diagram
Click OK, OK

The paramater type doesn't show up in the diagram until you save and reload.
Comment 1 Alexander Krivács Schrøder 2005-11-05 08:17:20 UTC
Thanks for the tip Jonathan. This was really bothering me.
Comment 2 Oliver Kellogg 2005-11-05 19:36:42 UTC
SVN commit 478044 by okellogg:

slotOk(): Call UMLDoc::createUMLObject(Uml::ot_Class) if typeName not found.
BUG:113748


 M  +1 -1      ChangeLog  
 M  +7 -4      umbrello/dialogs/parmpropdlg.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #478043:478044
@@ -13,7 +13,7 @@
  57588  57672  58809  66461  67120  67719  72016  79433  87252  88117
  97162  98368 101550 105564 107405 108223 109591 109636 110073 110216
 110231 110379 110400 110843 111088 111470 111502 111759 111768 112017
-112292 112293 112333 112531 112552 112936 112991 112992 114892
+112292 112293 112333 112531 112552 112936 112991 112992 113748 114892
 
 Version 1.4.2 (maintenance release)
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/parmpropdlg.cpp #478043:478044
@@ -1,5 +1,5 @@
 /*
- *  copyright (C) 2002-2004
+ *  copyright (C) 2002-2005
  *  Umbrello UML Modeller Authors <uml-devel@ uml.sf.net>
  */
 
@@ -204,10 +204,13 @@
             }
         }
         if (obj == NULL) {
-            // Nothing found: set type name directly. Bad.
+            // Nothing found: Create a new type on the fly.
+            // @todo There should be an extra dialog to decide whether to
+            // create a datatype or a class. For now, we create a class.
             kdDebug() << "ParmPropDlg::slotOk: " << typeName << " not found."
-            << endl;
-            m_pAtt->setTypeName( typeName );
+                << " Creating a new class for the type." << endl;
+            UMLObject *o = m_pUmldoc->createUMLObject(Uml::ot_Class, typeName);
+            m_pAtt->setType(o);
         }
 
     }