Author: mir3x Date: Sun Feb 5 16:45:12 2017 New Revision: 34972 URL: http://svn.gna.org/viewcvs/freeciv?rev=34972&view=rev Log: Qt client - Fixed user not able connect to network server after failed connection to local server.
See gna bug #25486 Modified: branches/S3_0/client/gui-qt/gui_main.cpp branches/S3_0/client/gui-qt/pages.cpp Modified: branches/S3_0/client/gui-qt/gui_main.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/gui_main.cpp?rev=34972&r1=34971&r2=34972&view=diff ============================================================================== --- branches/S3_0/client/gui-qt/gui_main.cpp (original) +++ branches/S3_0/client/gui-qt/gui_main.cpp Sun Feb 5 16:45:12 2017 @@ -254,6 +254,10 @@ **************************************************************************/ void qtg_real_conn_list_dialog_update() { + if (qtg_get_current_client_page() < PAGE_GAME + && qtg_get_current_client_page() != PAGE_START) { + qtg_real_set_client_page(PAGE_START); + } gui()->update_start_page(); } Modified: branches/S3_0/client/gui-qt/pages.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/pages.cpp?rev=34972&r1=34971&r2=34972&view=diff ============================================================================== --- branches/S3_0/client/gui-qt/pages.cpp (original) +++ branches/S3_0/client/gui-qt/pages.cpp Sun Feb 5 16:45:12 2017 @@ -1076,8 +1076,10 @@ client_start_server(); send_chat("/detach"); } - send_chat_printf("/load %s", current_file.toLocal8Bit().data()); - switch_page(PAGE_GAME + 1); + if (is_server_running()) { + send_chat_printf("/load %s", current_file.toLocal8Bit().data()); + switch_page(PAGE_GAME + 1); + } } /************************************************************************** @@ -1089,8 +1091,10 @@ client_start_server(); send_chat("/detach"); } - send_chat_printf("/load %s", current_file.toLocal8Bit().data()); - switch_page(PAGE_GAME + 1); + if (is_server_running()) { + send_chat_printf("/load %s", current_file.toLocal8Bit().data()); + switch_page(PAGE_GAME + 1); + } } /*************************************************************************** _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits