Author: mir3x Date: Sun Feb 5 16:45:21 2017 New Revision: 34973 URL: http://svn.gna.org/viewcvs/freeciv?rev=34973&view=rev Log: Qt client - Fixed user not able connect to network server after failed connection to local server.
See gna bug #25486 Modified: trunk/client/gui-qt/gui_main.cpp trunk/client/gui-qt/pages.cpp Modified: trunk/client/gui-qt/gui_main.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/gui_main.cpp?rev=34973&r1=34972&r2=34973&view=diff ============================================================================== --- trunk/client/gui-qt/gui_main.cpp (original) +++ trunk/client/gui-qt/gui_main.cpp Sun Feb 5 16:45:21 2017 @@ -250,6 +250,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: trunk/client/gui-qt/pages.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/pages.cpp?rev=34973&r1=34972&r2=34973&view=diff ============================================================================== --- trunk/client/gui-qt/pages.cpp (original) +++ trunk/client/gui-qt/pages.cpp Sun Feb 5 16:45:21 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