# HG changeset patch # User unc0rr # Date 1223909055 0 # Node ID 1102e19780b9e3ad2643ba9f40bf98703dcec0ea # Parent b4d51b95aa165a55c6be1449687b285ca9cf2d10 - Set focus to dead hedgehog - Switch from rooms list page to net page when disconnected from server diff -r b4d51b95aa16 -r 1102e19780b9 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Mon Oct 13 12:58:44 2008 +0000 +++ b/QTfrontend/hwform.cpp Mon Oct 13 14:44:15 2008 +0000 @@ -282,11 +282,14 @@ curTeamSelWidget->resetPlayingTeams(teamsList); } } + + if (id == ID_PAGE_ROOMSLIST && lastid == ID_PAGE_NETCFG) + GoBack(); } void HWForm::GoToPage(quint8 id) { - quint8 lastid=ui.Pages->currentIndex(); + quint8 lastid = ui.Pages->currentIndex(); PagesStack.push(ui.Pages->currentIndex()); OnPageShown(id, lastid); ui.Pages->setCurrentIndex(id); @@ -295,11 +298,12 @@ void HWForm::GoBack() { if (!PagesStack.isEmpty() && PagesStack.top() == ID_PAGE_NET) { - if(hwnet || pnetserver) NetDisconnect(); + if(hwnet || pnetserver) NetDisconnect(); } quint8 id = PagesStack.isEmpty() ? ID_PAGE_MAIN : PagesStack.pop(); - OnPageShown(id, ui.Pages->currentIndex()); + quint8 curid = ui.Pages->currentIndex(); ui.Pages->setCurrentIndex(id); + OnPageShown(id, curid); } void HWForm::btnExitPressed() diff -r b4d51b95aa16 -r 1102e19780b9 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Mon Oct 13 12:58:44 2008 +0000 +++ b/hedgewars/HHHandlers.inc Mon Oct 13 14:44:15 2008 +0000 @@ -617,6 +617,7 @@ Gear^.Timer:= 0; Gear^.State:= Gear^.State or gstHHDeath; Gear^.doStep:= @doStepHedgehogDead; + FollowGear:= Gear; PrvInactive:= false; AllInactive:= false end;