forked from mirror/OpenTTD
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
This commit is contained in:
committed by
GitHub
parent
55ed7d16f7
commit
15b99f2e7a
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user