[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
Oliver.Kellogg at t-online.de
Sun Sep 14 10:59:03 UTC 2003
CVS commit by okellogg:
draw(): Guard against m_pObject being NULL.
M +8 -11 nodewidget.cpp 1.10
--- kdesdk/umbrello/umbrello/nodewidget.cpp #1.9:1.10
@@ -61,5 +61,4 @@ void NodeWidget::draw(QPainter & p, int
int fontHeight = fm.lineSpacing();
QString name = getName();
- QString stereotype = m_pObject->getStereotype();
QPointArray pointArray(6);
@@ -77,14 +76,12 @@ void NodeWidget::draw(QPainter & p, int
p.setFont(font);
+ int lines = 1;
+ if (m_pObject) {
+ QString stereotype = m_pObject->getStereotype();
if (stereotype != "") {
p.drawText(offsetX, bodyOffsetY + (bodyHeight/2) - fontHeight,
bodyWidth, fontHeight, AlignCenter, "<< " + stereotype + " >>");
- }
-
- int lines;
- if (stereotype != "") {
lines = 2;
- } else {
- lines = 1;
+ }
}
More information about the umbrello-devel
mailing list