Merge branch 'master' into jgrpp
# Conflicts: # regression/regression/result.txt # src/aircraft_cmd.cpp # src/airport_gui.cpp # src/articulated_vehicles.cpp # src/console_cmds.cpp # src/date_gui.cpp # src/engine.cpp # src/genworld_gui.cpp # src/gfx_layout_fallback.cpp # src/group_gui.cpp # src/hotkeys.cpp # src/network/core/tcp_connect.cpp # src/network/core/tcp_listen.h # src/newgrf.cpp # src/newgrf.h # src/newgrf_engine.cpp # src/newgrf_gui.cpp # src/newgrf_station.cpp # src/openttd.cpp # src/order_gui.cpp # src/os/macosx/osx_main.cpp # src/pathfinder/yapf/yapf_node_rail.hpp # src/rail_gui.cpp # src/saveload/afterload.cpp # src/saveload/cargopacket_sl.cpp # src/saveload/linkgraph_sl.cpp # src/saveload/station_sl.cpp # src/script/api/script_industrytype.cpp # src/settings.cpp # src/settings_gui.cpp # src/settings_table.cpp # src/settingsgen/settingsgen.cpp # src/station.cpp # src/station_cmd.cpp # src/strings.cpp # src/timer/timer_game_calendar.cpp # src/timer/timer_game_calendar.h # src/timer/timer_manager.h # src/timer/timer_window.cpp # src/timetable_cmd.cpp # src/toolbar_gui.cpp # src/town_cmd.cpp # src/town_gui.cpp # src/train_gui.cpp # src/vehicle_cmd.h # src/vehicle_gui.cpp # src/viewport.cpp # src/widgets/dropdown.cpp # src/window_func.h # src/window_gui.h
This commit is contained in:
@@ -1066,7 +1066,7 @@ void Window::CloseChildWindows(WindowClass wc) const
|
||||
/**
|
||||
* Hide the window and all its child windows, and mark them for a later deletion.
|
||||
*/
|
||||
void Window::Close()
|
||||
void Window::Close([[maybe_unused]] int data)
|
||||
{
|
||||
if (_thd.window_class == this->window_class &&
|
||||
_thd.window_number == this->window_number) {
|
||||
@@ -1160,11 +1160,11 @@ Window *GetMainWindow()
|
||||
* @param number Number of the window within the window class
|
||||
* @param force force deletion; if false don't delete when stickied
|
||||
*/
|
||||
void CloseWindowById(WindowClass cls, WindowNumber number, bool force)
|
||||
void CloseWindowById(WindowClass cls, WindowNumber number, bool force, int data)
|
||||
{
|
||||
Window *w = FindWindowById(cls, number);
|
||||
if (w != nullptr && (force || (w->flags & WF_STICKY) == 0)) {
|
||||
w->Close();
|
||||
w->Close(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1174,14 +1174,14 @@ void CloseWindowById(WindowClass cls, WindowNumber number, bool force)
|
||||
* @param number Number of the window within the window class
|
||||
* @param force force deletion; if false don't delete when stickied
|
||||
*/
|
||||
void CloseAllWindowsById(WindowClass cls, WindowNumber number, bool force)
|
||||
void CloseAllWindowsById(WindowClass cls, WindowNumber number, bool force, int data)
|
||||
{
|
||||
if (cls < WC_END && !_present_window_types[cls]) return;
|
||||
|
||||
/* Note: the container remains stable, even when deleting windows. */
|
||||
for (Window *w : Window::Iterate()) {
|
||||
if (w->window_class == cls && w->window_number == number && (force || (w->flags & WF_STICKY) == 0)) {
|
||||
w->Close();
|
||||
w->Close(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1190,14 +1190,14 @@ void CloseAllWindowsById(WindowClass cls, WindowNumber number, bool force)
|
||||
* Delete all windows of a given class
|
||||
* @param cls Window class of windows to delete
|
||||
*/
|
||||
void CloseWindowByClass(WindowClass cls)
|
||||
void CloseWindowByClass(WindowClass cls, int data)
|
||||
{
|
||||
if (cls < WC_END && !_present_window_types[cls]) return;
|
||||
|
||||
/* Note: the container remains stable, even when deleting windows. */
|
||||
for (Window *w : Window::Iterate()) {
|
||||
if (w->window_class == cls) {
|
||||
w->Close();
|
||||
w->Close(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3752,7 +3752,7 @@ void RelocateAllWindows(int neww, int newh)
|
||||
* Hide the window and all its child windows, and mark them for a later deletion.
|
||||
* Always call ResetObjectToPlace() when closing a PickerWindow.
|
||||
*/
|
||||
void PickerWindowBase::Close()
|
||||
void PickerWindowBase::Close([[maybe_unused]] int data)
|
||||
{
|
||||
ResetObjectToPlace();
|
||||
this->Window::Close();
|
||||
|
Reference in New Issue
Block a user