← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1806230-enable-ok-button into lp:widelands


Notabilis has proposed merging lp:~widelands-dev/widelands/bug-1806230-enable-ok-button into lp:widelands.

Commit message:
Enabling OK button in map options of editor when tags are changed.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1806230 in widelands: "Editor: Map tags not changeable"

For more details, see:

Adding the missing linkage between changes to the tabs and enabling the OK button in the map option menu of the editor.
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1806230-enable-ok-button into lp:widelands.
=== modified file 'src/editor/ui_menus/main_menu_map_options.cc'
--- src/editor/ui_menus/main_menu_map_options.cc	2018-12-13 07:24:01 +0000
+++ src/editor/ui_menus/main_menu_map_options.cc	2018-12-19 21:39:17 +0000
@@ -129,6 +129,7 @@
 	// TODO(GunChleoc): We need team images in the listselect here,
 	// so map editors will be able to delete entries.
 	// This is waiting for the new RT renderer.
+	// TODO(Notabilis): Add onChanged-code below after this is added
 	teams_list_.add("Not implemented yet.", "", nullptr, false);
 	unsigned int nr_players = static_cast<unsigned int>(eia().egbase().map().get_nrplayers());
@@ -148,6 +149,9 @@
 	author_.changed.connect(boost::bind(&MainMenuMapOptions::changed, this));
 	descr_->changed.connect(boost::bind(&MainMenuMapOptions::changed, this));
 	hint_->changed.connect(boost::bind(&MainMenuMapOptions::changed, this));
+	for (const auto& tag : tags_checkboxes_) {
+		tag.second->changed.connect(boost::bind(&MainMenuMapOptions::changed, this));
+	}
 	ok_.sigclicked.connect(boost::bind(&MainMenuMapOptions::clicked_ok, boost::ref(*this)));
 	cancel_.sigclicked.connect(boost::bind(&MainMenuMapOptions::clicked_cancel, boost::ref(*this)));

Follow ups