Summary: | An abstract class can't provide interface in component diagram | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Lea Viljanen <ladybug> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Lea Viljanen
2004-08-26 11:55:04 UTC
SVN commit 418324 by okellogg: BUG:88117 - Allow abstract class as interface in component diagram. M +2 -2 ChangeLog M +15 -7 umbrello/umlview.cpp --- trunk/KDE/kdesdk/umbrello/ChangeLog #418323:418324 @@ -2,10 +2,10 @@ * Association classes * Externalization of folders (i.e. submodel files) -* Change interface into class and vice versa (if no attributes) +* Change interface into class and vice versa (if abstract and no attributes) * Bugs fixed / wishes implemented (see http://bugs.kde.org) -57588 79433 87252 105564 +57588 79433 87252 88117 105564 Version 1.4.1 (maintenance release) --- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #418323:418324 @@ -513,11 +513,14 @@ } } break; - case ot_Class: // CORRECT? + case ot_Class: //see if we really want an object widget or class widget - if(getType() == dt_Class) { + if (m_Type == dt_Class || m_Type == dt_Component) { UMLClassifier *c = static_cast<UMLClassifier*>(o); - newWidget = new ClassifierWidget(this, c); + ClassifierWidget *cw = new ClassifierWidget(this, c); + if (m_Type == dt_Component) + cw->setDrawAsCircle(true); + newWidget = cw; } else { ObjectWidget *ow = new ObjectWidget(this, o, getLocalID() ); if (m_Type == dt_Sequence) { @@ -637,10 +640,15 @@ e->accept(false); return; } - if (diagramType == dt_Component && - (ot != ot_Interface && ot != ot_Component && ot != ot_Artifact)) { - e->accept(false); - return; + if (diagramType == dt_Component) { + if (ot != ot_Interface && ot != ot_Component && ot != ot_Artifact && ot != ot_Class) { + e->accept(false); + return; + } + if (ot == ot_Class && !temp->getAbstract()) { + e->accept(false); + return; + } } if (diagramType == dt_EntityRelationship && (ot != ot_Entity )) { |