Changeset - r24824:25e416ad7835
[Not reviewed]
master
0 2 0
Jonathan G Rennison - 3 years ago 2021-02-18 11:29:30
j.g.rennison@gmail.com
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
2 files changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/company_cmd.cpp
Show inline comments
 
@@ -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 Comp
 
{
 
	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);
 
}
 

	
src/date.cpp
Show inline comments
 
@@ -19,6 +19,7 @@
 
#include "linkgraph/linkgraph.h"
 
#include "saveload/saveload.h"
 
#include "newgrf_profiling.h"
 
#include "widgets/statusbar_widget.h"
 

	
 
#include "safeguards.h"
 

	
 
@@ -255,7 +256,7 @@ static void OnNewDay()
 
	DisasterDailyLoop();
 
	IndustryDailyLoop();
 

	
 
	SetWindowWidgetDirty(WC_STATUS_BAR, 0, 0);
 
	SetWindowWidgetDirty(WC_STATUS_BAR, 0, WID_S_LEFT);
 
	EnginesDailyLoop();
 

	
 
	/* Refresh after possible snowline change */
0 comments (0 inline, 0 general)