Skip to content

Commit

Permalink
Fix the city screen "Present units" list disappearing
Browse files Browse the repository at this point in the history
When opening a city without any units, the "Present units" list is hidden to
save space. It was never restored afterwards.
  • Loading branch information
lmoureaux authored and jwrober committed Aug 15, 2022
1 parent 4659b57 commit 5bcd84f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/citydlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2272,11 +2272,9 @@ void city_dialog::update_units()
units = pcity->tile->units;
}

ui.present_units_list->set_units(units);
if (unit_list_size(units) == 0) {
ui.present_units_list->hide();
}
n = unit_list_size(units);
ui.present_units_list->set_units(units);
ui.present_units_list->setVisible(n > 0);
fc_snprintf(buf, sizeof(buf), _("Present units %d"), n);
ui.curr_units->setText(QString(buf));
}
Expand Down

0 comments on commit 5bcd84f

Please sign in to comment.