Fix koda's esc key binding so leaving rooms works correctly with it
authornemo
Sun, 21 Nov 2010 01:26:31 -0500
changeset 4392 95e27e12d0e9
parent 4391 de9e1a5102b4
child 4393 883b979697e4
child 4394 c1f2ca416ea8
Fix koda's esc key binding so leaving rooms works correctly with it
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Sun Nov 21 01:08:43 2010 -0500
+++ b/QTfrontend/hwform.cpp	Sun Nov 21 01:26:31 2010 -0500
@@ -276,7 +276,7 @@
 
 void HWForm::keyReleaseEvent(QKeyEvent *event)
 {
-  if (event->key() == Qt::Key_Escape /*|| event->key() == Qt::Key_Backspace*/ )
+  if (event->key() == Qt::Key_Escape /*|| event->key() == Qt::Key_Backspace*/ ) 
     this->GoBack();
 }
 
@@ -521,6 +521,7 @@
             GoBack();
 
     if (curid == ID_PAGE_ROOMSLIST) NetDisconnect();
+    if (curid == ID_PAGE_NETGAME) hwnet->partRoom();
 
     if (curid == ID_PAGE_SCHEME)
         ammoSchemeModel->Save();
@@ -678,7 +679,7 @@
     connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
     connect(hwnet, SIGNAL(LeftRoom()), this, SLOT(NetLeftRoom()));
     connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)));
-    connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom()));
+    //connect(ui.pageNetGame->BtnBack, SIGNAL(clicked()), hwnet, SLOT(partRoom()));
 
 // rooms list page stuff
     connect(hwnet, SIGNAL(roomsList(const QStringList&)),