[umbrello] [Bug 447661] Diagram objects moved to inside enclosing package become invisible
Oliver Kellogg
bugzilla_noreply at kde.org
Wed Dec 29 21:51:37 GMT 2021
https://bugs.kde.org/show_bug.cgi?id=447661
--- Comment #1 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
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
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list