Fix disconnect

master
Timothy Pearson 13 years ago
parent fa038ebd48
commit b74c9f41d0

@ -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<KMdiChildView*> *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);

Loading…
Cancel
Save