Author: mir3x Date: Mon Dec 14 02:56:04 2015 New Revision: 30990 URL: http://svn.gna.org/viewcvs/freeciv?rev=30990&view=rev Log: Added function to close units selection on disconnect in Qt-client.
See patch #6655 Modified: trunk/client/gui-qt/dialogs.cpp trunk/client/gui-qt/fc_client.cpp trunk/client/gui-qt/fc_client.h Modified: trunk/client/gui-qt/dialogs.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=30990&r1=30989&r2=30990&view=diff ============================================================================== --- trunk/client/gui-qt/dialogs.cpp (original) +++ trunk/client/gui-qt/dialogs.cpp Mon Dec 14 02:56:04 2015 @@ -2304,6 +2304,7 @@ popdown_science_report(); popdown_city_report(); popdown_endgame_report(); + gui()->popdown_unit_sel(); } /************************************************************************** Modified: trunk/client/gui-qt/fc_client.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fc_client.cpp?rev=30990&r1=30989&r2=30990&view=diff ============================================================================== --- trunk/client/gui-qt/fc_client.cpp (original) +++ trunk/client/gui-qt/fc_client.cpp Mon Dec 14 02:56:04 2015 @@ -644,6 +644,18 @@ } /**************************************************************************** + Closes unit selection widget. +****************************************************************************/ +void fc_client::popdown_unit_sel() +{ + if (unit_sel != nullptr){ + unit_sel->close(); + delete unit_sel; + unit_sel = nullptr; + } +} + +/**************************************************************************** Removes report dialog string from the list marking it as closed ****************************************************************************/ void fc_client::remove_repo_dlg(QString str) Modified: trunk/client/gui-qt/fc_client.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/fc_client.h?rev=30990&r1=30989&r2=30990&view=diff ============================================================================== --- trunk/client/gui-qt/fc_client.h (original) +++ trunk/client/gui-qt/fc_client.h Mon Dec 14 02:56:04 2015 @@ -199,6 +199,7 @@ void update_start_page(); void toggle_unit_sel_widget(struct tile *ptile); void update_unit_sel(); + void popdown_unit_sel(); void popup_tile_info(struct tile *ptile); void popdown_tile_info(); void set_diplo_dialog(choice_dialog *widget); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits