mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-11 02:46:32 +00:00
fix listboxes having problems to find sort toggle buttons in different columns.
This commit is contained in:
parent
09e88c89d1
commit
ff9a9e017a
@ -526,7 +526,7 @@ void tlistbox::finalize(tbuilder_grid_const_ptr header,
|
|||||||
}
|
}
|
||||||
tgrid& p = find_widget<tgrid>(this, "_header_grid", false);
|
tgrid& p = find_widget<tgrid>(this, "_header_grid", false);
|
||||||
for(unsigned i = 0, max = std::max(p.get_cols(), p.get_rows()); i < max; ++i) {
|
for(unsigned i = 0, max = std::max(p.get_cols(), p.get_rows()); i < max; ++i) {
|
||||||
if(tselectable_* selectable = find_widget<tselectable_>(p.widget(0,i), "sort_" + lexical_cast<std::string>(i), false, false)) {
|
if(tselectable_* selectable = find_widget<tselectable_>(&p, "sort_" + lexical_cast<std::string>(i), false, false)) {
|
||||||
selectable->set_callback_state_change(boost::bind(&tlistbox::order_by_column, this, i, _1));
|
selectable->set_callback_state_change(boost::bind(&tlistbox::order_by_column, this, i, _1));
|
||||||
if(orders_.size() < max ) {
|
if(orders_.size() < max ) {
|
||||||
orders_.resize(max);
|
orders_.resize(max);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user