Skip to content

Commit

Permalink
Fix performing actions from the city screen
Browse files Browse the repository at this point in the history
The condition in most if(can_issue_orders()) was reversed.
Closes #819.
  • Loading branch information
lmoureaux committed Feb 5, 2022
1 parent 99e2cdb commit 29efe22
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions client/gui-qt/citydlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ bool unit_list_item::can_issue_orders() const
*/
void unit_list_item::disband()
{
if (!can_issue_orders()) {
if (can_issue_orders()) {
auto *units = unit_list_new();
unit_list_append(units, m_unit);
popup_disband_dialog(units);
Expand All @@ -759,11 +759,11 @@ void unit_list_item::disband()
}

/**
Loads unit into some tranport
Loads unit into some transport
*/
void unit_list_item::load()
{
if (!can_issue_orders()) {
if (can_issue_orders()) {
qtg_request_transport(m_unit, unit_tile(m_unit));
}
}
Expand All @@ -773,7 +773,7 @@ void unit_list_item::load()
*/
void unit_list_item::unload()
{
if (!can_issue_orders()) {
if (can_issue_orders()) {
request_unit_unload(m_unit);
}
}
Expand All @@ -783,7 +783,7 @@ void unit_list_item::unload()
*/
void unit_list_item::unload_all()
{
if (!can_issue_orders()) {
if (can_issue_orders()) {
request_unit_unload_all(m_unit);
}
}
Expand All @@ -793,7 +793,7 @@ void unit_list_item::unload_all()
*/
void unit_list_item::upgrade()
{
if (!can_issue_orders()) {
if (can_issue_orders()) {
auto *units = unit_list_new();
unit_list_append(units, m_unit);
popup_upgrade_dialog(units);
Expand All @@ -802,7 +802,7 @@ void unit_list_item::upgrade()
}

/**
Changes homecity for given unit
Changes home city for given unit
*/
void unit_list_item::change_homecity()
{
Expand Down

0 comments on commit 29efe22

Please sign in to comment.