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

@@ -309,6 +309,7 @@ struct BuildRoadToolbarWindow : Window {
~BuildRoadToolbarWindow()
{
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
}
@@ -531,6 +532,7 @@ struct BuildRoadToolbarWindow : Window {
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
DeleteWindowById(WC_SELECT_STATION, 0);
DeleteWindowByClass(WC_BUILD_BRIDGE);
EraseQueuedTouchCommand();
}
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
@@ -1016,6 +1018,7 @@ struct BuildRoadStationWindow : public PickerWindowBase {
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
EraseQueuedTouchCommand();
break;
case WID_BROS_LT_OFF: