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

When deleting port widgets, also delete the corresponding UML port

BUG:403515
FIXED-IN:2.27.2 (KDE Applications 18.12.2)
parent f0afd735
......@@ -17,7 +17,9 @@
#include "debug_utils.h"
#include "dialog_utils.h"
#include "listpopupmenu.h"
#include "uml.h"
#include "umldoc.h"
#include "umllistview.h"
#include "umlscene.h"
#include "componentwidget.h"
#include "floatingtextwidget.h"
......@@ -46,6 +48,12 @@ PortWidget::PortWidget(UMLScene *scene, UMLPort *d, UMLWidget *owner)
*/
PortWidget::~PortWidget()
{
if (m_umlObject) {
// delete related uml object
UMLApp::app()->document()->slotRemoveUMLObject(m_umlObject);
UMLApp::app()->listView()->slotObjectRemoved(m_umlObject);
delete m_umlObject;
}
}
/**
......
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