Commit ed0b7085 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix 'Adding connected widgets cannot be cancelled'

BUG:415889
FIXED-IN:2.30.1 (KDE Applications 19.12.1)
parent b554c49a
......@@ -2110,6 +2110,13 @@ bool UMLWidget::loadFromXMI1(QDomElement & qElement)
*/
void UMLWidget::addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum type, AddWidgetOptions options)
{
if (options & ShowProperties) {
if (!widget->showPropertiesDialog()) {
delete widget;
return;
}
}
umlScene()->addItem(widget);
widget->setX(x() + rect().width() + 100);
widget->setY(y());
......@@ -2123,8 +2130,6 @@ void UMLWidget::addConnectedWidget(UMLWidget *widget, Uml::AssociationType::Enum
umlScene()->addAssociation(assoc);
umlScene()->clearSelected();
umlScene()->selectWidget(widget);
if (options & ShowProperties)
widget->showPropertiesDialog();
}
/**
......
Supports Markdown
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