# HG changeset patch # User displacer # Date 1169152168 0 # Node ID c3ccec3834e85983d55b05d253f6a61aa5603efd # Parent 5b37d6a39829d770c326570dad759fc352475b65 more correct net disconnection diff -r 5b37d6a39829 -r c3ccec3834e8 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Thu Jan 18 19:59:04 2007 +0000 +++ b/QTfrontend/hwform.cpp Thu Jan 18 20:29:28 2007 +0000 @@ -180,6 +180,9 @@ void HWForm::GoBack() { + if (!PagesStack.isEmpty() && PagesStack.top() == ID_PAGE_NET) { + NetDisconnect(); + } quint8 id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop(); OnPageShown(id); ui.Pages->setCurrentIndex(id); @@ -280,7 +283,6 @@ void HWForm::NetDisconnect() { hwnet->Disconnect(); - GoBack(); delete hwnet; hwnet=0; if(pnetserver) { diff -r 5b37d6a39829 -r c3ccec3834e8 QTfrontend/netserver.cpp --- a/QTfrontend/netserver.cpp Thu Jan 18 19:59:04 2007 +0000 +++ b/QTfrontend/netserver.cpp Thu Jan 18 20:29:28 2007 +0000 @@ -59,6 +59,9 @@ void HWNetServer::ClientDisconnect(HWConnectedClient* client) { QList::iterator it=std::find(connclients.begin(), connclients.end(), client); + for(QList::iterator tmIt=(*it)->m_teamsCfg.begin(); tmIt!=(*it)->m_teamsCfg.end(); ++tmIt) { + sendOthers(*it, QString("REMOVETEAM:")+delimeter+*(tmIt->begin())); + } connclients.erase(it); //teamChanged(); }