-
Oliver Kellogg authored
from UMLScene to the owning widget) umbrello/widgets/umlwidget.{h,cpp} - New virtual function widgetWithID() returns 'this' if given id matches either of m_nLocalID, m_umlObject->id(), or m_nId; else returns NULL. The intention is that child classes of UMLWidget may reimplement this function in order to test the id against their child widgets. umbrello/widgets/portwidget.{h,cpp} - Reimplement UMLWidget function widgetWithID() to additionally check m_pName. - In function slotMenuSelection() case ListPopupMenu::mt_NameAsTooltip, - If m_pName is non NULL then do not call m_scene->removeWidget(m_pName). Reason: m_pName is now entirely managed by PortWidget. - If m_pName is NULL then after assigning a new FloatingTextWidget to m_pName call m_pName->setParentItem(this). This completes the switchover of m_pName management from UMLScene. Further, this means that m_pName position is no longer relative to UMLScene but instead is now relative to its owning PortWidget. Adjust m_pName X/Y computations accordingly. - In function setFloatingTextWidget(), m_pName->setParentItem(this) if m_pName is non NULL. - In function loadFromXMI(), - Remove loading of attribute "textid"; - If m_pName->loadFromXMI() returns with success then call m_pName->setParentItem(this). - In function saveToXMI(), remove saving of attribute "textid". umbrello/umlscene.{h,cpp} - In function widgetOnDiagram(), - in foreach loop over m_WidgetList, call obj->widgetWithID(id) instead of direct comparison (id == obj->id()) - in foreach loop over m_MessageList, add TODO note about checking whether MessageWidget should reimplement widgetWithID() - In function findWidget(), - in foreach loop over m_WidgetList, replace special casing of wt_Object and direct comparison (id == obj->id()) by call to obj->widgetWithID(id) - in foreach loop over m_MessageList, add TODO note about checking whether MessageWidget should reimplement widgetWithID() - Remove function findWidgetByLocalId(); due to above change it is redundant to findWidget(). umbrello/cmds/widget/cmd_baseWidgetCommand.cpp umbrello/cmds/widget/cmd_createWidget.cpp umbrello/cmds/widget/cmd_removeWidget.cpp - In function redo() call umlScene->findWidget() in lieu of umlScene->findWidgetByLocalId() which was removed. umbrello/widgets/floatingtextwidget.{h,cpp} - Reimplement UMLWidget function onWidget() to additionally check PortWidget parentage. - In function setText(), avoid calling m_linkWidget->seqNumAndOp() when m_linkWidget is NULL. - In function loadFromXMI(), call setText() instead of directly assigning m_Text in order to achieve geometry update. (To be checked.) - Fix spelling at bool usefulWidget. - In function saveToXMI(), return immediately if isEmpty() returns true. umbrello/widgets/pinwidget.cpp - In function loadFromXMI(), add TODO note about removing the code for loading "textid". umbrello/version.h - Increment XMI_FILE_VERSION due to changes in function saveToXMI() of FloatingTextWidget and PortWidget.
0f47f8fc