Author: mir3x
Date: Sun Jan  3 13:47:31 2016
New Revision: 31326

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

See bug #24247


Modified:
    trunk/client/gui-qt/dialogs.cpp
    trunk/client/gui-qt/dialogs.h

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=31326&r1=31325&r2=31326&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Sun Jan  3 13:47:31 2016
@@ -2865,6 +2865,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: trunk/client/gui-qt/dialogs.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.h?rev=31326&r1=31325&r2=31326&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.h       (original)
+++ trunk/client/gui-qt/dialogs.h       Sun Jan  3 13:47:31 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