[Uml-devel] branches/work/soc-umbrello/umbrello/widgets
Gopala Krishna A
krishna.ggk at gmail.com
Tue Aug 18 04:08:32 UTC 2009
SVN commit 1012798 by gopala:
ComponentWidget:
* Check before static casting a UMLObject to UMLComponent.
* Corrected the spacing of text displayed.
M +5 -1 componentwidget.cpp
--- branches/work/soc-umbrello/umbrello/widgets/componentwidget.cpp #1012797:1012798
@@ -45,6 +45,10 @@
*/
void ComponentWidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
+ if (!umlObject() || umlObject()->getBaseType() != Uml::ot_Component) {
+ uError() << "Does not contain valid UMLComponent object";
+ return;
+ }
UMLComponent *umlcomp = static_cast<UMLComponent*>(umlObject());
QPen pen(lineColor(), lineWidth());
@@ -101,7 +105,7 @@
QString nameText = name();
bool underline = false;
if(this->isInstance()) {
- nameText.prepend(':');
+ nameText.prepend(" : ");
nameText.prepend(instanceName());
underline = true;
}
More information about the umbrello-devel
mailing list