[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Dec 31 17:18:58 UTC 2006
SVN commit 618229 by okellogg:
addAssociationInViewAndDoc(): Set the UMLPackage in the UMLAssociation.
Addresses Commment #2. Might also fix the hang, I can't tell.
CCBUG:139295
M +7 -1 toolbarstateassociation.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/toolbarstateassociation.cpp #618228:618229
@@ -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