gui2/simple_item_selector: Hide the message label when it's empty...

...so it doesn't take up space

Some day there should be a way to specify in the dialog WML to
auto-hide a control with an empty label.
This commit is contained in:
Ignacio R. Morelle 2011-06-27 09:47:21 +00:00
parent b65cba6f96
commit 55c1a2e47a

View file

@ -89,6 +89,10 @@ void tsimple_item_selector::pre_show(CVideo& /*video*/, twindow& window)
lmessage.set_label(msg_);
lmessage.set_use_markup(markup_msg_);
if(msg_.empty()) {
lmessage.set_visible(gui2::twidget::INVISIBLE);
}
foreach(const tsimple_item_selector::item_type& it, items_) {
std::map<std::string, string_map> data;
string_map column;