← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~notabilis27/widelands/bug-message-window into lp:widelands

 

GunChleoc has proposed merging lp:~notabilis27/widelands/bug-message-window into lp:widelands.

Commit message:
Disable center button at once when message window is opened.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1638409 in widelands: "Pressing "center" button to fast in message window leads to crash"
  https://bugs.launchpad.net/widelands/+bug/1638409

For more details, see:
https://code.launchpad.net/~notabilis27/widelands/bug-message-window/+merge/309814

Center with no target causes crash.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~notabilis27/widelands/bug-message-window into lp:widelands.
=== modified file 'src/wui/game_message_menu.cc'
--- src/wui/game_message_menu.cc	2016-10-24 14:04:00 +0000
+++ src/wui/game_message_menu.cc	2016-11-02 05:41:18 +0000
@@ -142,6 +142,7 @@
 	                   % _("Center main mapview on location"))
 	                     .str());
 	centerviewbtn_->sigclicked.connect(boost::bind(&GameMessageMenu::center_view, this));
+	centerviewbtn_->set_enabled(false);
 
 	if (get_usedefaultpos())
 		center_to_parent();