Merge branch 'master' into jgrpp

# Conflicts:
#	regression/regression/result.txt
#	src/autoreplace_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/network/network_content.cpp
#	src/newgrf_roadstop.cpp
#	src/pathfinder/yapf/yapf_ship.cpp
#	src/road_gui.cpp
#	src/saveload/ai_sl.cpp
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/station.cpp
#	src/station_gui.cpp
#	src/video/cocoa/cocoa_ogl.h
#	src/video/sdl2_opengl_v.h
#	src/video/video_driver.hpp
#	src/video/win32_v.h
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
#	src/window.cpp
This commit is contained in:
Jonathan G Rennison
2024-02-19 18:50:33 +00:00
119 changed files with 4346 additions and 2129 deletions

View File

@@ -317,13 +317,11 @@ struct ScriptSettingsWindow : public Window {
closing_dropdown(false),
timeout(0)
{
this->script_config = GetConfig(slot);
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_SCRS_SCROLLBAR);
this->FinishInitNested(slot); // Initializes 'this->line_height' as side effect.
this->RebuildVisibleSettings();
this->OnInvalidateData();
}
void Close(int data = 0) override
@@ -609,6 +607,8 @@ struct ScriptSettingsWindow : public Window {
*/
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
{
this->script_config = GetConfig(this->slot);
if (this->script_config->GetConfigList()->empty()) this->Close();
this->RebuildVisibleSettings();
HideDropDownMenu(this);
this->CloseChildWindows(WC_QUERY_STRING);
@@ -1231,7 +1231,8 @@ struct ScriptDebugWindow : public Window {
this->SetWidgetLoweredState(WID_SCRD_BREAK_STR_ON_OFF_BTN, this->filter.break_check_enabled);
this->SetWidgetLoweredState(WID_SCRD_MATCH_CASE_BTN, this->filter.case_sensitive_break_check);
this->SetWidgetDisabledState(WID_SCRD_SETTINGS, this->filter.script_debug_company == INVALID_COMPANY);
this->SetWidgetDisabledState(WID_SCRD_SETTINGS, this->filter.script_debug_company == INVALID_COMPANY ||
GetConfig(this->filter.script_debug_company)->GetConfigList()->empty());
extern CompanyID _local_company;
this->SetWidgetDisabledState(WID_SCRD_RELOAD_TOGGLE,
this->filter.script_debug_company == INVALID_COMPANY ||