Fix cage-related bug in the sort plugin.

develop
Petr Mrázek 2012-08-03 16:09:51 +02:00
parent 61195859e3
commit 81ea0345ad
3 changed files with 8 additions and 3 deletions

@ -1 +1 @@
Subproject commit c85e9fb35d3510c5dcc367056cda3237d77a7add
Subproject commit d0b2d0750dc2d529a152eba4f3f519f69ff7eab0

@ -431,12 +431,17 @@ DEFINE_SORT_HANDLER(unit_sorters, dwarfmode, "/QueryBuilding/Some/Assign", scree
sort_null_first(parameters);
PARSE_SPEC("units", parameters);
if (compute_order(*pout, L, top, &order, *ui_building_assign_units))
{
reorder_cursor(ui_building_item_cursor, order);
reorder_vector(ui_building_assign_type, order);
reorder_vector(ui_building_assign_units, order);
// this is for cages. cages need some extra sorting
if(ui_building_assign_items->size() == ui_building_assign_units->size())
{
reorder_vector(ui_building_assign_items, order);
reorder_vector(ui_building_assign_is_marked, order);
}
}
}

@ -1 +1 @@
Subproject commit 17b653665567a5f1df628217820f76bb0b9c70a5
Subproject commit 5d4f06d785f8a9933679fe3caa12c18215e9674d