[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Thu Jun 7 09:52:32 UTC 2007
SVN commit 672495 by okellogg:
setFloatingText(): Call setTextPosition() on newly constructed FloatingTextWidget.
M +7 -13 associationwidget.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/associationwidget.cpp #672494:672495
@@ -5,8 +5,8 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2002-2006 *
- * Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
+ * copyright (C) 2002-2007 *
+ * Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
// own header
@@ -350,25 +350,19 @@
return;
}
- bool newLabel = false;
if (ft == NULL) {
ft = new FloatingTextWidget(m_pView, tr, text);
ft->setLink(this);
+ ft->activate();
+ setTextPosition(tr);
m_pView->addWidget(ft);
- newLabel = true;
} else {
- if (ft->getText().isEmpty()) {
- newLabel = true;
- }
+ bool newLabel = ft->getText().isEmpty();
ft->setText(text);
+ if (newLabel)
+ setTextPosition(tr);
}
- ft->setActivated();
-
- if (newLabel) {
- setTextPosition( tr );
- }
-
ft->show();
}
More information about the umbrello-devel
mailing list