summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2021-02-18 11:29:30 +0000
committerGitHub <noreply@github.com>2021-02-18 12:29:30 +0100
commit15b99f2e7ae0b2ab4bce18c1663dff95220f42e0 (patch)
treeb1f8956efd3f121489310080547197aa999dcd89 /src/company_cmd.cpp
parent55ed7d16f7e4e8189840ae90048284311eb2f45f (diff)
downloadopenttd-15b99f2e7ae0b2ab4bce18c1663dff95220f42e0.tar.xz
Fix: Whole status bar instead of money widget refreshed on money change (#8692)
This could result in the rest of the status bar being redrawn unnecessarily frequently
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index fee312b8d..21f7125b7 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -35,6 +35,7 @@
#include "game/game.hpp"
#include "goal_base.h"
#include "story_base.h"
+#include "widgets/statusbar_widget.h"
#include "table/strings.h"
@@ -182,7 +183,7 @@ void InvalidateCompanyWindows(const Company *company)
{
CompanyID cid = company->index;
- if (cid == _local_company) SetWindowDirty(WC_STATUS_BAR, 0);
+ if (cid == _local_company) SetWindowWidgetDirty(WC_STATUS_BAR, 0, WID_S_RIGHT);
SetWindowDirty(WC_FINANCES, cid);
}