Author: mir3x Date: Wed Jan 25 22:35:23 2017 New Revision: 34892 URL: http://svn.gna.org/viewcvs/freeciv?rev=34892&view=rev Log: Qt client - Fixed unit autocentering when left clicking something outside active unit visible screen.
See bug #25466 Modified: branches/S3_0/client/gui-qt/mapctrl.cpp branches/S3_0/client/gui-qt/mapview.h Modified: branches/S3_0/client/gui-qt/mapctrl.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/mapctrl.cpp?rev=34892&r1=34891&r2=34892&view=diff ============================================================================== --- branches/S3_0/client/gui-qt/mapctrl.cpp (original) +++ branches/S3_0/client/gui-qt/mapctrl.cpp Wed Jan 25 22:35:23 2017 @@ -388,6 +388,8 @@ sc = fc_shortcuts::sc()->get_shortcut(SC_SELECT_BUTTON); if (((key && key == sc->key) || bt == sc->mouse) && md == sc->mod) { if (goto_is_active() == false) { + stored_autocenter = gui_options.auto_center_on_unit; + gui_options.auto_center_on_unit = false; action_button_pressed(pos.x(), pos.y(), SELECT_FOCUS); } return; @@ -432,6 +434,7 @@ } if (keyboardless_goto_active == false || goto_is_active() == true) { action_button_pressed(pos.x(), pos.y(), SELECT_POPUP); + gui_options.auto_center_on_unit = stored_autocenter; } release_goto_button(pos.x(), pos.y()); return; Modified: branches/S3_0/client/gui-qt/mapview.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/mapview.h?rev=34892&r1=34891&r2=34892&view=diff ============================================================================== --- branches/S3_0/client/gui-qt/mapview.h (original) +++ branches/S3_0/client/gui-qt/mapview.h Wed Jan 25 22:35:23 2017 @@ -102,6 +102,7 @@ private: void update_font(const QString &name, const QFont &font); + bool stored_autocenter; int cursor_frame; int cursor; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits