Author: mir3x
Date: Sun Jan  3 13:47:23 2016
New Revision: 31325

URL: http://svn.gna.org/viewcvs/freeciv?rev=31325&view=rev
Log:
Fixed focus when closing unit selection.
Reported by Jacob Nevins <jtn>

See bug #24247


Modified:
    branches/S2_6/client/gui-qt/dialogs.cpp
    branches/S2_6/client/gui-qt/dialogs.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=31325&r1=31324&r2=31325&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/dialogs.cpp     (original)
+++ branches/S2_6/client/gui-qt/dialogs.cpp     Sun Jan  3 13:47:23 2016
@@ -2603,6 +2603,15 @@
 }
 
 /****************************************************************
+  Close event for unit_select, restores focus to map
+*****************************************************************/
+void unit_select::closeEvent(QCloseEvent* event)
+{
+  gui()->mapview_wdg->setFocus();
+  QWidget::closeEvent(event);
+}
+
+/****************************************************************
   Mouse wheel event for unit_select
 *****************************************************************/
 void unit_select::wheelEvent(QWheelEvent *event)

Modified: branches/S2_6/client/gui-qt/dialogs.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/dialogs.h?rev=31325&r1=31324&r2=31325&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/dialogs.h       (original)
+++ branches/S2_6/client/gui-qt/dialogs.h       Sun Jan  3 13:47:23 2016
@@ -183,6 +183,7 @@
   void keyPressEvent(QKeyEvent *event);
   void mouseMoveEvent(QMouseEvent *event);
   void wheelEvent(QWheelEvent *event);
+  void closeEvent(QCloseEvent *event);
 private:
   bool more;
   int show_line;


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

Reply via email to