summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-31 09:31:56 +0000
committerrubidium <rubidium@openttd.org>2009-05-31 09:31:56 +0000
commit0eaec8edca83ee01ae164e75582630470a222924 (patch)
tree67045706b3a9accbc0bd8cd43186fd4e2aed38a1
parent34f6b8614e42624a6abaa1e3da69c80f22874bbb (diff)
downloadopenttd-0eaec8edca83ee01ae164e75582630470a222924.tar.xz
(svn r16474) -Fix [FS#2933]: could set company related settings via query window
-rw-r--r--src/settings_gui.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index 10a0dd016..d32685566 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -1541,7 +1541,11 @@ struct GameSettingsWindow : Window {
/* Save the correct currency-translated value */
if (sd->desc.flags & SGF_CURRENCY) value /= _currency->rate;
- SetSettingValue(this->valuewindow_entry->d.entry.index, value);
+ if ((sd->desc.flags & SGF_PER_COMPANY) != 0) {
+ SetCompanySetting(this->valuewindow_entry->d.entry.index, value);
+ } else {
+ SetSettingValue(this->valuewindow_entry->d.entry.index, value);
+ }
this->SetDirty();
}
}