[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Wed May 9 18:18:07 UTC 2007
SVN commit 662968 by okellogg:
apply r662842,662844 from trunk
M +7 -0 dialogs/classgenpage.cpp
M +2 -1 umldoc.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/classgenpage.cpp #662967:662968
@@ -383,6 +383,13 @@
if(m_pPackageLE)
m_pObject -> setPackage(m_pPackageLE -> text());
*/
+
+ if ( m_pObject->getUMLPackage() == NULL ) {
+ kDebug() << k_funcinfo << "Parent package not set, setting it to Logical View folder"<<endl;
+ UMLFolder* folder = m_pUmldoc->getRootFolder( Uml::mt_Logical );
+ m_pObject->setUMLPackage( ( UMLPackage* )folder );
+ }
+
if( m_pAbstractCB )
m_pObject -> setAbstract( m_pAbstractCB -> isChecked() );
//make sure unique name
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umldoc.cpp #662967:662968
@@ -734,6 +734,7 @@
pkg = currentRoot();
kDebug() << "UMLDoc::addUMLObject(" << object->getName()
<< "): no parent package set, assuming " << pkg->getName() << endl;
+ object->setUMLPackage( pkg );
}
return pkg->addObject(object);
}
@@ -1117,7 +1118,7 @@
return m_root[Uml::mt_Logical];
}
UMLFolder *f = currentView->getFolder();
- while (f) {
+ while (f->getUMLPackage()) {
f = static_cast<UMLFolder*>(f->getUMLPackage());
}
return f;
More information about the umbrello-devel
mailing list