Skip to content

Commit

Permalink
view_units: Fix find, disband and upgrade buttons
Browse files Browse the repository at this point in the history
The checks whether the find, disband and upgrade buttons should be
enabled reference the wrong columns in the table.

This commit fixes the column references.
  • Loading branch information
blabber authored and jwrober committed Jan 18, 2024
1 parent 5667660 commit d56b8a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/views/view_units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ void units_view::selection_changed(const QItemSelection &sl,
qvar = itm->data(Qt::UserRole);
uid = qvar.toInt();
selected = cid_decode(uid);
counter = ui.units_widget->item(curr_row, 3)->text().toInt();
counter = ui.units_widget->item(curr_row, 4)->text().toInt();
if (counter > 0) {
ui.disband_but->setDisabled(false);
ui.find_but->setDisabled(false);
}
upg = ui.units_widget->item(curr_row, 1)->text();
upg = ui.units_widget->item(curr_row, 2)->text();
if (upg != "-") {
ui.upg_but->setDisabled(false);
}
Expand Down

0 comments on commit d56b8a2

Please sign in to comment.