Author: mir3x
Date: Mon Dec 14 02:55:39 2015
New Revision: 30988

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

See patch #6655


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

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

Modified: branches/S2_5/client/gui-qt/fc_client.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/fc_client.cpp?rev=30988&r1=30987&r2=30988&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/fc_client.cpp   (original)
+++ branches/S2_5/client/gui-qt/fc_client.cpp   Mon Dec 14 02:55:39 2015
@@ -649,6 +649,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_5/client/gui-qt/fc_client.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/fc_client.h?rev=30988&r1=30987&r2=30988&view=diff
==============================================================================
--- branches/S2_5/client/gui-qt/fc_client.h     (original)
+++ branches/S2_5/client/gui-qt/fc_client.h     Mon Dec 14 02:55:39 2015
@@ -201,6 +201,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_current_unit(int curr, int target);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to