1
0
Fork 0

(svn r21539) -Fix [FS#4315]: Show 'plant trees' button lowering of terraform toolbar.

release/1.1
alberth 2010-12-19 13:44:09 +00:00
parent 5a6c9877cb
commit 8626954fc3
1 changed files with 7 additions and 0 deletions

View File

@ -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);