summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-08-08 11:21:24 +0000
committeralberth <alberth@openttd.org>2010-08-08 11:21:24 +0000
commit7ad1f5ccef8f58656c391b0f5854b3b776eeed3b (patch)
tree7559beb5faf504560a9b5995af5c58298bb7d477 /src/industry_gui.cpp
parent2fa665114e5cd9136b80e8a5e91a3418986a41d0 (diff)
downloadopenttd-7ad1f5ccef8f58656c391b0f5854b3b776eeed3b.tar.xz
(svn r20415) -Add: Clicking at the smallmap disables updates from the industry chain window.
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index 97b7cf983..5f66973a8 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -2281,11 +2281,21 @@ struct IndustryCargoesWindow : public Window {
}
/**
- * Notify the window to display another industry type.
- * @param data The new industry type to display.
+ * Notify the window about external events.
+ * - data = 0 .. NUM_INDUSTRYTYPES - 1: Display the chain around the given industry.
+ * - data = NUM_INDUSTRYTYPES: Stop sending updates to the smallmap window.
+ * @param data The event.
*/
virtual void OnInvalidateData(int data)
{
+ if (data == NUM_INDUSTRYTYPES) {
+ if (this->IsWidgetLowered(ICW_NOTIFY)) {
+ this->RaiseWidget(ICW_NOTIFY);
+ this->SetWidgetDirty(ICW_NOTIFY);
+ }
+ return;
+ }
+
assert(data >= 0 && data < NUM_INDUSTRYTYPES);
this->ComputeIndustryDisplay(data);
}