Author: mir3x
Date: Mon Dec 14 02:55:51 2015
New Revision: 30989

URL: http://svn.gna.org/viewcvs/freeciv?rev=30989&view=rev
Log:
Added function to close units selection on disconnect in Qt-client.

See patch #6655


Modified:
    branches/S2_6/client/gui-qt/dialogs.cpp
    branches/S2_6/client/gui-qt/fc_client.cpp
    branches/S2_6/client/gui-qt/fc_client.h

Modified: branches/S2_6/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/dialogs.cpp?rev=30989&r1=30988&r2=30989&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/dialogs.cpp     (original)
+++ branches/S2_6/client/gui-qt/dialogs.cpp     Mon Dec 14 02:55:51 2015
@@ -2058,6 +2058,7 @@
   popdown_science_report();
   popdown_city_report();
   popdown_endgame_report();
+  gui()->popdown_unit_sel();
 }
 
 /**************************************************************************

Modified: branches/S2_6/client/gui-qt/fc_client.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/fc_client.cpp?rev=30989&r1=30988&r2=30989&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/fc_client.cpp   (original)
+++ branches/S2_6/client/gui-qt/fc_client.cpp   Mon Dec 14 02:55:51 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: branches/S2_6/client/gui-qt/fc_client.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/fc_client.h?rev=30989&r1=30988&r2=30989&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/fc_client.h     (original)
+++ branches/S2_6/client/gui-qt/fc_client.h     Mon Dec 14 02:55:51 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

Reply via email to