Commit 48be64aa authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix 'Copy and paste of interface in component diagram does not update the displayed name'

We need to override WidgetBase::setUMLObject() to propagate the new object
name to the floating text widget holding the interface name.

BUG:403853
FIXED-IN:2.27.2 (KDE Applications 18.12.2)
parent ea41f50f
......@@ -1507,3 +1507,15 @@ bool ClassifierWidget::showPropertiesDialog()
}
return false;
}
/**
* Overriding the method from WidgetBase because we need to do
* something extra in case this ClassifierWidget represents
* an interface widget used in component diagrams.
*/
void ClassifierWidget::setUMLObject(UMLObject *obj)
{
WidgetBase::setUMLObject(obj);
if (isInterfaceWidget() && visualProperty(DrawAsCircle))
m_pInterfaceName->setText(obj->name());
}
......@@ -107,6 +107,7 @@ public:
virtual bool loadFromXMI1(QDomElement & qElement);
virtual bool showPropertiesDialog();
void setUMLObject(UMLObject *obj);
public Q_SLOTS:
virtual void slotMenuSelection(QAction* action);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment