Author: mir3x Date: Sun Jan 3 13:47:03 2016 New Revision: 31324 URL: http://svn.gna.org/viewcvs/freeciv?rev=31324&view=rev Log: Fixed focus when closing unit selection. Reported by Jacob Nevins <jtn>
See bug #24247 Modified: branches/S2_5/client/gui-qt/dialogs.cpp branches/S2_5/client/gui-qt/dialogs.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=31324&r1=31323&r2=31324&view=diff ============================================================================== --- branches/S2_5/client/gui-qt/dialogs.cpp (original) +++ branches/S2_5/client/gui-qt/dialogs.cpp Sun Jan 3 13:47:03 2016 @@ -2397,6 +2397,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_5/client/gui-qt/dialogs.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/dialogs.h?rev=31324&r1=31323&r2=31324&view=diff ============================================================================== --- branches/S2_5/client/gui-qt/dialogs.h (original) +++ branches/S2_5/client/gui-qt/dialogs.h Sun Jan 3 13:47:03 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