Fixed bridge GUI broken due to confirmation dialog
This commit is contained in:
@@ -290,7 +290,6 @@ struct BuildDocksToolbarWindow : Window {
|
|||||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
||||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
||||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SelectLastTool()
|
virtual void SelectLastTool()
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "station_map.h"
|
#include "station_map.h"
|
||||||
#include "tunnelbridge_map.h"
|
#include "tunnelbridge_map.h"
|
||||||
|
#include "build_confirmation_func.h"
|
||||||
|
|
||||||
#include "widgets/rail_widget.h"
|
#include "widgets/rail_widget.h"
|
||||||
|
|
||||||
@@ -775,7 +776,7 @@ struct BuildRailToolbarWindow : Window {
|
|||||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL);
|
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL);
|
||||||
DeleteWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL);
|
DeleteWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL);
|
||||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
if (!ConfirmationWindowShown()) DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SelectLastTool()
|
virtual void SelectLastTool()
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include "hotkeys.h"
|
#include "hotkeys.h"
|
||||||
#include "road_gui.h"
|
#include "road_gui.h"
|
||||||
#include "zoom_func.h"
|
#include "zoom_func.h"
|
||||||
|
#include "build_confirmation_func.h"
|
||||||
|
|
||||||
#include "widgets/road_widget.h"
|
#include "widgets/road_widget.h"
|
||||||
|
|
||||||
@@ -550,7 +551,7 @@ struct BuildRoadToolbarWindow : Window {
|
|||||||
DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);
|
DeleteWindowById(WC_TRUCK_STATION, TRANSPORT_ROAD);
|
||||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
|
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_ROAD);
|
||||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
if (!ConfirmationWindowShown()) DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SelectLastTool()
|
virtual void SelectLastTool()
|
||||||
|
|||||||
@@ -1441,8 +1441,9 @@ void Window::InitializeData(WindowNumber window_number)
|
|||||||
this->window_number = window_number;
|
this->window_number = window_number;
|
||||||
|
|
||||||
if (this->window_class != WC_BUILD_CONFIRMATION &&
|
if (this->window_class != WC_BUILD_CONFIRMATION &&
|
||||||
this->window_class != WC_TOOLTIPS &&
|
this->window_class != WC_TOOLTIPS &&
|
||||||
this->window_class != WC_NEWS_WINDOW) {
|
this->window_class != WC_NEWS_WINDOW &&
|
||||||
|
this->window_class != WC_BUILD_BRIDGE) {
|
||||||
HideBuildConfirmationWindow();
|
HideBuildConfirmationWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user