[Uml-devel] KDE/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Dec 31 17:19:44 UTC 2006
SVN commit 618230 by okellogg:
apply commit 618229 from branches/KDE/3.5
M +7 -1 toolbarstateassociation.cpp
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstateassociation.cpp #618229:618230
@@ -19,8 +19,10 @@
// app includes
#include "assocrules.h"
+#include "association.h"
#include "associationwidget.h"
#include "classifierwidget.h"
+#include "folder.h"
#include "model_utils.h"
#include "uml.h"
#include "umlobject.h"
@@ -205,7 +207,11 @@
// append in view
if (m_pUMLView->addAssociation(a, false)) {
// if view went ok, then append in document
- UMLApp::app()->getDocument()->addAssociation(a->getAssociation());
+ UMLAssociation *umla = a->getAssociation();
+ Uml::Model_Type m = Model_Utils::convert_DT_MT(m_pUMLView->getType());
+ UMLDoc *umldoc = UMLApp::app()->getDocument();
+ umla->setUMLPackage(umldoc->getRootFolder(m));
+ UMLApp::app()->getDocument()->addAssociation(umla);
} else {
kError() << "cannot addAssocInViewAndDoc(), deleting" << endl;
delete a;
More information about the umbrello-devel
mailing list