Commit 759b1cc5 authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix 'the application assumes the class element is a folder type'

BUG:415990
FIXED-IN:2.30.80 (KDE Applications 19.03.80)
parent bd1c32c0
......@@ -2758,10 +2758,22 @@ bool UMLListView::deleteItem(UMLListViewItem *temp)
if (nmSpc) {
UMLObjectList &contained = nmSpc->containedObjects();
if (contained.count()) {
KMessageBox::error(
0,
i18n("The folder must be emptied before it can be deleted."),
i18n("Folder Not Empty"));
if (nmSpc->baseType() == UMLObject::ot_Class) {
KMessageBox::error(
nullptr,
i18n("The class must be emptied before it can be deleted."),
i18n("Class Not Empty"));
} else if (nmSpc->baseType() == UMLObject::ot_Package) {
KMessageBox::error(
nullptr,
i18n("The package must be emptied before it can be deleted."),
i18n("Package Not Empty"));
} else if (nmSpc->baseType() == UMLObject::ot_Folder) {
KMessageBox::error(
nullptr,
i18n("The folder must be emptied before it can be deleted."),
i18n("Folder Not Empty"));
}
return false;
}
}
......
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