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

"Oliver Kellogg" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=447866

--- Comment #1 from Oliver Kellogg <[email protected]> ---
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.