summaryrefslogtreecommitdiff
path: root/src/economy.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-02-04 20:29:38 +0000
committerrubidium <rubidium@openttd.org>2013-02-04 20:29:38 +0000
commit99a08e1e8cec3d73bf802e64b9e460e71f47cb43 (patch)
treebe103dfa43a828c12444678bce7fe67c679b372f /src/economy.cpp
parent26adb854e05d781f05f29c4584c5c58d92461cce (diff)
downloadopenttd-99a08e1e8cec3d73bf802e64b9e460e71f47cb43.tar.xz
(svn r24968) -Fix [FS#5379]: company window was not updated when shared were enabled/disabled
Diffstat (limited to 'src/economy.cpp')
-rw-r--r--src/economy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index cebe8c479..f1b5c9666 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1818,7 +1818,7 @@ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1,
break;
}
}
- SetWindowDirty(WC_COMPANY, target_company);
+ InvalidateWindowData(WC_COMPANY, target_company);
CompanyAdminUpdate(c);
}
return cost;
@@ -1856,7 +1856,7 @@ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1
OwnerByte *b = c->share_owners;
while (*b != _current_company) b++; // share owners is guaranteed to contain company
*b = COMPANY_SPECTATOR;
- SetWindowDirty(WC_COMPANY, target_company);
+ InvalidateWindowData(WC_COMPANY, target_company);
CompanyAdminUpdate(c);
}
return CommandCost(EXPENSES_OTHER, cost);