Summary: | Diagram objects moved to inside enclosing package become invisible | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Oliver Kellogg <okellogg> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | saulotoledo |
Priority: | NOR | ||
Version: | Git | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/sdk/umbrello/commit/a038b342b30a43faae177cd140bddccbd1daf674 | Version Fixed In: | 2.33.80 (KDE releases 22.03.80) |
Sentry Crash Report: |
Description
Oliver Kellogg
2021-12-29 20:28:17 UTC
Git commit 8f410485cfcc75a4fe452708d8b1aa009ae35f50 by Oliver Kellogg. Committed on 29/12/2021 at 21:51. Pushed by okellogg into branch 'master'. Fix "Diagram objects moved to inside enclosing package become invisible" umbrello/umlwidgets/widget_utils.{h,cpp} - New function ensureNestedVisible prevents nested widget(s) located inside the area of a larger widget from disappearing. This is achieved by increasing the Z value on the contained widgets. umbrello/toolbarstate.cpp - In function mouseRelease add debug messages in the branches of the if-chain to ease tracing of events. - In function mouseReleaseEmpty, if m_currentWidget is non null then call Widget_Utils::ensureNestedVisible with arguments m_currentWidget and m_pUMLScene->widgetList(). umbrello/umlwidgets/toolbarstateonewidget.cpp - Split if-statement testing m_pMouseEvent->button() and currentWidget() into two separate if-statements. Return immediately if m_pMouseEvent->button() is not Qt::LeftButton. - Add local UMLWidget *currWgt as shorthand for currentWidget(). - Call Widget_Utils::ensureNestedVisible with arguments currWgt and m_pUMLScene->widgetList() before executing the second part of the split if-statement (see above). umbrello/umlwidgets/umlwidget.{h,cpp} - New function isLocatedIn(const UMLWidget *other) returns true if `this' is located in the bounding rectangle of `other'. umbrello/umlwidgets/umlwidget.cpp - In function mouseReleaseEvent : - In if-statement testing (!m_moved && !m_resized), if neither (!m_shiftPressed && (m_scene->selectedCount() > 1)) nor !isSelected() evaluates to true then call Widget_Utils::ensureNestedVisible(this, umlScene()->widgetList()). - In else-part of the if-statement, if m_moved is true then - local UMLWidgetList selectedWidgets acts as shorthand for umlScene()->selectedWidgets(); - in foreach-loop over selectedWidgets additionally call Widget_Utils::ensureNestedVisible with arguments `widget' and umlScene()->widgetList(). - In function setSelected add call to Widget_Utils::ensureNestedVisible(this, umlScene()->widgetList()). M +9 -1 umbrello/toolbarstate.cpp M +17 -8 umbrello/umlwidgets/toolbarstateonewidget.cpp M +50 -2 umbrello/umlwidgets/umlwidget.cpp M +2 -0 umbrello/umlwidgets/umlwidget.h M +21 -0 umbrello/umlwidgets/widget_utils.cpp M +3 -1 umbrello/umlwidgets/widget_utils.h https://invent.kde.org/sdk/umbrello/commit/8f410485cfcc75a4fe452708d8b1aa009ae35f50 Git commit a038b342b30a43faae177cd140bddccbd1daf674 by Oliver Kellogg. Committed on 30/12/2021 at 13:07. Pushed by okellogg into branch 'master'. Completion of fix for "Diagram objects moved to inside enclosing package become invisible" umbrello/umlscene.cpp - In function createAutoAssociations code handling "object is capable of containing nested objects" use new function UMLWidget::isLocatedIn(). Reason: WidgetBase function rect() always returns x() and y() with value 0, which is not right for this context. M +2 -2 umbrello/umlscene.cpp https://invent.kde.org/sdk/umbrello/commit/a038b342b30a43faae177cd140bddccbd1daf674 *** Bug 209757 has been marked as a duplicate of this bug. *** |