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()). CCBUG: 447661
Please register or sign in to comment