Reset queued command when closing windows that can queue them.

This commit is contained in:
Juanjo
2013-10-14 17:49:14 +00:00
committed by pelya
parent 02caad7c1b
commit b164486616
6 changed files with 13 additions and 1 deletions

View File

@@ -103,6 +103,7 @@ struct BuildDocksToolbarWindow : Window {
~BuildDocksToolbarWindow()
{
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
}
@@ -279,6 +280,7 @@ struct BuildDocksToolbarWindow : Window {
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
DeleteWindowById(WC_SELECT_STATION, 0);
DeleteWindowByClass(WC_BUILD_BRIDGE);
EraseQueuedTouchCommand();
}
virtual void OnPlacePresize(Point pt, TileIndex tile_from)
@@ -551,6 +553,7 @@ public:
this->LowerWidget(_ship_depot_direction + WID_BDD_X);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
UpdateDocksDirection();
EraseQueuedTouchCommand();
this->SetDirty();
break;
}