[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sat Jul 3 04:35:06 UTC 2004
CVS commit by okellogg:
setTextPosition(): Correct calculation of xUpperBound.
M +6 -3 messagewidget.cpp 1.34
--- kdesdk/umbrello/umbrello/messagewidget.cpp #1.33:1.34
@@ -213,11 +213,14 @@ void MessageWidget::setTextPosition() {
m_pFText->calculateSize();
const int xLowerBound = getX() + 5;
- const int xUpperBound = m_pOw[B]->getX() - m_pFText->getWidth();
int ftX = m_pFText->getX();
if (ftX < xLowerBound ||
m_sequenceMessageType == sequence_message_synchronous)
ftX = xLowerBound;
- else if (ftX > xUpperBound)
+ else {
+ const int objB_seqLineX = m_pOw[B]->getX() + m_pOw[B]->getWidth() / 2;
+ const int xUpperBound = objB_seqLineX - m_pFText->getWidth() - 5;
+ if (ftX > xUpperBound)
ftX = xUpperBound;
+ }
m_pFText->setLinePos(ftX, getY() - m_pFText->getHeight());
}
More information about the umbrello-devel
mailing list