diff --git a/containment.cpp b/containment.cpp index 4c17edec3..406c7133a 100644 --- a/containment.cpp +++ b/containment.cpp @@ -933,11 +933,15 @@ void Containment::destroy() if (immutability() != Mutable) { return; } - //FIXME maybe that %1 should be the containment type not the name - if (KMessageBox::warningContinueCancel(0, i18n("Do you really want to remove this %1?", name()), - i18n("Remove %1", name()), KStandardGuiItem::remove()) == KMessageBox::Continue ) { - clearApplets(); - corona()->destroyContainment(this); + if (isContainment()) { + //FIXME maybe that %1 should be the containment type not the name + if (KMessageBox::warningContinueCancel(0, i18n("Do you really want to remove this %1?", name()), + i18n("Remove %1", name()), KStandardGuiItem::remove()) == KMessageBox::Continue ) { + clearApplets(); + corona()->destroyContainment(this); + } + } else { + Applet::destroy(); } }