diff --git a/clients/tde/src/app/remotemdi.cpp b/clients/tde/src/app/remotemdi.cpp index be285ae..8a566e2 100644 --- a/clients/tde/src/app/remotemdi.cpp +++ b/clients/tde/src/app/remotemdi.cpp @@ -328,6 +328,10 @@ void RemoteMDI::disconnectFromServer() { connect_action->setEnabled(false); disconnect_action->setEnabled(false); + m_instrumentActionList.clear(); + unplugActionList("instrumentMenu_actionlist"); + unplugActionList("instrumentToolBar_actionlist"); + // Close all windows KMdiIterator *it = createIterator(); while (it->currentItem()) { @@ -447,6 +451,9 @@ void RemoteMDI::closeSpecifiedWindow(KMdiChildView *window) { updateStatusBarWindowMessage(TQString::null, TQT_TQOBJECT(window)); updateStatusBarMainMessage(i18n("Instrument %1 removed").arg(window->tabCaption())); + // Unplug menus + unplugActionList("selectedInstrument_actionlist"); + // We could also call removeWindowFromMdi, but it doesn't delete the // pointer. This way, we're sure that the view will get deleted. closeWindow(window);