[umbrello] [Bug 447866] [class diagram] Multiple association ends are drawn on the same edge point

Oliver Kellogg bugzilla_noreply at kde.org
Mon Jan 3 07:50:35 GMT 2022


https://bugs.kde.org/show_bug.cgi?id=447866

--- Comment #1 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 33610081b96ad4ebf2abc5839081be7dd40f1e41 by Oliver Kellogg.
Committed on 03/01/2022 at 07:50.
Pushed by okellogg into branch 'master'.

Minimal fix for "Multiple association ends are drawn on the same edge point"

umbrello/umlwidgets/associationline.cpp
- In function mousePressEvent case (event->buttons() & Qt::LeftButton),
  remove the code for "end points are not drawn and hence not active",
  i.e. remove the snippet
  if (m_activePointIndex != -1 && isEndPointIndex(m_activePointIndex)) {
      m_activePointIndex = -1;
  }
- As a peripheral change, fix a typo in documentation of functions
  hoverEnterEvent, hoverMoveEvent, hoverLeaveEvent.

umbrello/umlwidgets/associationwidget.cpp
- In function activate(IDChangeLog*) only call calculateEndingPoints()
  if umlDoc()->loading() returns false.
  Reason: Manually adjusted association endpoint positions saved in the
  XMI file are overwritten by calculateEndingPoints().
- As peripheral changes,
  - in function moveEvent remove a few unneeded parentheses in if-
    conditions;
  - in function updateRegionLineCount debug message print the function
    name.

The above fix is only minimal because as soon as a class is moved on the
diagram, the manual adjustments are overwritten by the automatic
endpoint calculation.
Currently, manual adjustments should be done as the last step.

M  +3    -7    umbrello/umlwidgets/associationline.cpp
M  +10   -6    umbrello/umlwidgets/associationwidget.cpp

https://invent.kde.org/sdk/umbrello/commit/33610081b96ad4ebf2abc5839081be7dd40f1e41

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list