Changeset - r27439:04e49b112b0d
[Not reviewed]
master
0 1 0
Jonathan G Rennison - 16 months ago 2023-05-25 22:15:15
j.g.rennison@gmail.com
Fix: Rail waypoint selection window not closed

When rail toolbar or rail waypoint build windows closed
1 file changed with 7 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -420,12 +420,13 @@ struct BuildRailToolbarWindow : Window {
 
	}
 

	
 
	void Close() override
 
	{
 
		if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) SetViewportCatchmentStation(nullptr, true);
 
		if (_settings_client.gui.link_terraform_toolbar) CloseWindowById(WC_SCEN_LAND_GEN, 0, false);
 
		CloseWindowById(WC_SELECT_STATION, 0);
 
		this->Window::Close();
 
	}
 

	
 
	/**
 
	 * Configures the rail toolbar for railtype given
 
	 * @param railtype the railtype to display
 
@@ -2019,12 +2020,18 @@ struct BuildRailWaypointWindow : PickerW
 
		this->string_filter.SetFilterTerm(this->editbox.text.buf);
 

	
 
		this->list.ForceRebuild();
 
		this->BuildPickerList();
 
	}
 

	
 
	void Close() override
 
	{
 
		CloseWindowById(WC_SELECT_STATION, 0);
 
		this->PickerWindowBase::Close();
 
	}
 

	
 
	bool FilterByText(const StationSpec *statspec)
 
	{
 
		if (this->string_filter.IsEmpty()) return true;
 
		this->string_filter.ResetState();
 
		if (statspec == nullptr) {
 
			this->string_filter.AddLine(GetString(STR_STATION_CLASS_WAYP_WAYPOINT));
0 comments (0 inline, 0 general)