Author: mordante
Date: Sat Sep 20 09:15:31 2008
New Revision: 29563
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29563&view=rev
Log:
Test whether a cell has only one widget.
Before multiple widgets in a cell were silently ignored, now it gives an
error and aborts the game.
Modified:
trunk/src/gui/widgets/window_builder.cpp
Modified: trunk/src/gui/widgets/window_builder.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window_builder.cpp?rev=29563&r1=29562&r2=29563&view=diff
==============================================================================
--- trunk/src/gui/widgets/window_builder.cpp (original)
+++ trunk/src/gui/widgets/window_builder.cpp Sat Sep 20 09:15:31 2008
@@ -388,6 +388,13 @@
border_size.push_back(lexical_cast_default<unsigned>((**col_itor)["border_size"]));
if(rows == 0) {
col_grow_factor.push_back(lexical_cast_default<unsigned>((**col_itor)["grow_factor"]));
+ }
+
+ if((**col_itor).all_children().size() != 1) {
+ ERR_G_P << "Grid cell has " <<
(**col_itor).all_children().size()
+ << " children instead of 1, aborting.
Config :\n"
+ << **col_itor;
+ assert(false);
}
if((**col_itor).child("button")) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits