Commit 279dc4c0 authored by Ralf Habacker's avatar Ralf Habacker

Increase resolution by using UMLSceneValue in ObjectWidget::messageOverlap().

Also check for same widget first to avoid unused calculation.

CCBUG:320109
parent 394628cc
......@@ -543,12 +543,15 @@ void ObjectWidget::slotMessageMoved()
* @param y top of your message
* @param messageWidget pointer to your message so it doesn't check against itself
*/
bool ObjectWidget::messageOverlap(int y, MessageWidget* messageWidget)
bool ObjectWidget::messageOverlap(UMLSceneValue y, MessageWidget* messageWidget)
{
foreach (MessageWidget* message, m_messages) {
const int msgY = message->y();
const int msgHeight = msgY + message->height();
if (y >= msgY && y <= msgHeight && message != messageWidget) {
if (message == messageWidget) {
continue;
}
const UMLSceneValue msgY = message->y();
const UMLSceneValue msgHeight = msgY + message->height();
if (y >= msgY && y <= msgHeight) {
return true;
}
}
......
......@@ -73,7 +73,7 @@ public:
bool canTabUp();
bool messageOverlap(int y, MessageWidget* messageWidget);
bool messageOverlap(UMLSceneValue y, MessageWidget* messageWidget);
SeqLineWidget *sequentialLine() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment