Skip to content

Commit da13c1c

Browse files
committed
ui: fill_employment_details() not fill workers_desc label now
1 parent 1f57aee commit da13c1c

3 files changed

+4
-10
lines changed

src/window/window_building_info.cpp

+2-8
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,15 @@ void building_info_window::common_info_background(object_info& c) {
9494
ui["warning_text"] = ui::str(reason.first, reason.second);
9595
ui["workers_desc"] = ui::str(workers.first, workers.second);
9696

97-
fill_employment_details(c, -1);
97+
fill_employment_details(c);
9898
}
9999

100100
void building_info_window::fill_employment_details(object_info &c, int text_id) {
101101
building *b = building_get(c);
102102

103103
int laborers = model_get_building(b->type)->laborers;
104104
ui["workers_text"].text_var("%d %s (%d %s", b->num_workers, ui::str(8, 12), laborers, ui::str(69, 0));
105-
if (text_id < 0) {
106-
text_id = get_employment_info_text_id(&c, b, 1);
107-
}
108-
109-
if (text_id > 0) {
110-
ui["workers_desc"] = ui::str(69, text_id);
111-
}
105+
text_id = get_employment_info_text_id(&c, b, 1);
112106
}
113107

114108
void building_info_window::window_info_background(object_info &c) {

src/window/window_info_storageyard_orders.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void info_window_storageyard_orders::draw_background(object_info *c) {
2525
void info_window_storageyard_orders::draw_foreground(object_info *c) {
2626
building_info_window::window_info_background(*c);
2727

28-
resource_list resources = city_resource_get_available();
28+
const resource_list resources = city_resource_get_available();
2929
auto &data = g_window_building_distribution;
3030

3131
auto *b = c->building_get();

src/window/window_resource_settings.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static void handle_input(const mouse* m, const hotkeys* h) {
216216
}
217217

218218
void window_resource_settings_show(e_resource resource) {
219-
window_type window = {
219+
static window_type window = {
220220
WINDOW_RESOURCE_SETTINGS,
221221
draw_background,
222222
draw_foreground,

0 commit comments

Comments
 (0)