diff options
author | alberth <alberth@openttd.org> | 2010-12-19 13:44:09 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-12-19 13:44:09 +0000 |
commit | 8626954fc3dca49ecc45c1a22bd42136b2838e3f (patch) | |
tree | bafc16940123fcdc25448bfcfb6741895cda5ecf /src/terraform_gui.cpp | |
parent | 5a6c9877cbbe79c2c53414c9e46bcad3c6a1d434 (diff) | |
download | openttd-8626954fc3dca49ecc45c1a22bd42136b2838e3f.tar.xz |
(svn r21539) -Fix [FS#4315]: Show 'plant trees' button lowering of terraform toolbar.
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r-- | src/terraform_gui.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index 62f609b6d..1901203d5 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -200,6 +200,7 @@ static void TerraformClick_BuyLand(Window *w) static void TerraformClick_Trees(Window *w) { /* This button is NOT a place-push-button, so don't treat it as such */ + w->HandleButtonClick(TTW_PLANT_TREES); ShowBuildTreesToolbar(); } @@ -250,6 +251,12 @@ struct TerraformToolbarWindow : Window { if (widget >= TTW_BUTTONS_START) _terraform_button_proc[widget - TTW_BUTTONS_START](this); } + virtual void OnTimeout() + { + this->RaiseWidget(TTW_PLANT_TREES); + this->SetWidgetDirty(TTW_PLANT_TREES); + } + virtual EventState OnKeyPress(uint16 key, uint16 keycode) { int num = CheckHotkeyMatch(terraform_hotkeys, keycode, this); |