Commit cd350fa7 authored by Ralf Habacker's avatar Ralf Habacker

Write package widgets into the xmi file using a "packagewidget" tag.

This commit is a fixup of commit a6e8b2e4.
Thanks to Oliver Kellogg for pointing out.

CCBUG:352597
CCBUG:336012
parent 3ccfd097
......@@ -1293,7 +1293,13 @@ void ClassifierWidget::saveToXMI(QDomDocument & qDoc, QDomElement & qElement)
{
QDomElement conceptElement;
UMLClassifier *umlc = classifier();
if (umlc && umlc->isInterface())
if (umlObject() && umlObject()->baseType() == UMLObject::ot_Package) {
conceptElement = qDoc.createElement(QLatin1String("packagewidget"));
UMLWidget::saveToXMI(qDoc, conceptElement);
qElement.appendChild(conceptElement);
return;
}
else if (umlc && umlc->isInterface())
conceptElement = qDoc.createElement(QLatin1String("interfacewidget"));
else
conceptElement = qDoc.createElement(QLatin1String("classwidget"));
......
......@@ -86,6 +86,8 @@ UMLWidget *createWidget(UMLScene *scene, UMLObject *o)
newWidget = new UseCaseWidget(scene, static_cast<UMLUseCase*>(o));
break;
case UMLObject::ot_Folder:
newWidget = new PackageWidget(scene, static_cast<UMLPackage*>(o));
break;
case UMLObject::ot_Package:
newWidget = new ClassifierWidget(scene, static_cast<UMLPackage*>(o));
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment