Bug 429794 - Callback message in sequence diagram cannot be resized
Summary: Callback message in sequence diagram cannot be resized
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-29 09:38 UTC by Oliver Kellogg
Modified: 2021-02-11 23:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.33.80 (KDE releases 21.03.80)


Attachments
seq_callback_msg_resize.xmi reproducer XMI file (12.48 KB, application/x-uml)
2020-11-29 09:38 UTC, Oliver Kellogg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kellogg 2020-11-29 09:38:52 UTC
Created attachment 133719 [details]
seq_callback_msg_resize.xmi reproducer XMI file

SUMMARY

Callback message in sequence diagram cannot be resized

STEPS TO REPRODUCE
1. Start umbrello.
2. Load the attached file seq_callback_msg_resize.xmi.
3. Try grabbing the return line of the C1::callback message in order to resize.

OBSERVED RESULT

On messages originating at a class located at the right and targeting a class located more to the left (in this example, the method "callback"), where the message is enclosed by another message, it is not possible to select the resize area located the right end (the origin).
Apparently the resize area is hidden underneath the execution rectangle of the enclosing message.

EXPECTED RESULT

It shall be possible to select the resize are of a message embedded in another message.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSuSE Tumbleweed
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.76.0
Qt Version: 5.15.1
Comment 1 Oliver Kellogg 2020-11-29 22:40:59 UTC
Git commit eae999b7903c30a7570ba7f5e907801cd399cbc4 by Oliver Kellogg.
Committed on 29/11/2020 at 22:40.
Pushed by okellogg into branch 'master'.

Fix for 'Callback message in sequence diagram cannot be resized'

umbrello/umlwidgets/messagewidget.{h,cpp}
- Reimplement UMLWidget::isInResizeArea instead of resizeCursor.
  Reason: In case of a message widget running from right to left, the
  resize area is at the left bottom corner because the message's
  execution specification is also at the left.  Furthermore, the right
  side may be covered up by another message's execution specification.

umbrello/umlwidgets/umlwidget.cpp
- In function mousePressEvent extend debug message to show pos() and
  event->scenePos().
- In function paint(QPainter*,const QStyleOptionGraphicsItem*, QWidget*)
  case (option->state & QStyle::State_Selected)
    case (m_resizable && w >= s+8 && h >= s+8),
  - int horSide initialized to `w' replaces variable `right';
  - if baseType() is wt_Message and the message's role A ObjectWidget is
    to the right of the role B ObjectWidget then set horSide to a small
    value in order to place the resize anchor at the role B object;
  - in calls to painter->drawLine() use horSide in lieu of `right'.

M  +45   -8    umbrello/umlwidgets/messagewidget.cpp
M  +4    -4    umbrello/umlwidgets/messagewidget.h
M  +26   -5    umbrello/umlwidgets/umlwidget.cpp

https://invent.kde.org/sdk/umbrello/commit/eae999b7903c30a7570ba7f5e907801cd399cbc4