Merge branch 'master' into jgrpp
# Conflicts: # Makefile.src.in # findversion.sh # projects/determineversion.vbs # src/aircraft_cmd.cpp # src/lang/dutch.txt # src/linkgraph/linkgraph_gui.cpp # src/linkgraph/linkgraph_gui.h # src/order_cmd.cpp # src/settings_gui.cpp # src/smallmap_gui.cpp # src/town_cmd.cpp # src/viewport.cpp # src/water_map.h
This commit is contained in:
@@ -74,6 +74,7 @@ void LinkGraphOverlay::RebuildCache(bool incremental)
|
||||
if (!incremental) {
|
||||
this->cached_links.clear();
|
||||
this->cached_stations.clear();
|
||||
this->last_update_number = GetWindowUpdateNumber();
|
||||
}
|
||||
if (this->company_mask == 0) return;
|
||||
|
||||
@@ -344,6 +345,10 @@ void LinkGraphOverlay::RefreshDrawCache()
|
||||
*/
|
||||
void LinkGraphOverlay::Draw(const DrawPixelInfo *dpi)
|
||||
{
|
||||
if (this->dirty) {
|
||||
this->RebuildCache();
|
||||
this->dirty = false;
|
||||
}
|
||||
if (this->last_update_number != GetWindowUpdateNumber()) {
|
||||
this->last_update_number = GetWindowUpdateNumber();
|
||||
this->RefreshDrawCache();
|
||||
|
Reference in New Issue
Block a user