| 1009 | } |
| 1010 | |
| 1011 | void Close([[maybe_unused]] int data = 0) override |
| 1012 | { |
| 1013 | if (this->parent != nullptr) { |
| 1014 | if (this->parent->window_class == WC_STATION_VIEW) SetViewportStationRect(Station::Get(this->parent->window_number), false); |
| 1015 | if (this->parent->window_class == WC_WAYPOINT_VIEW) SetViewportWaypointRect(Waypoint::Get(this->parent->window_number), false); |
| 1016 | |
| 1017 | if (!this->editbox.handled) { |
| 1018 | Window *parent = this->parent; |
| 1019 | this->parent = nullptr; // so parent doesn't try to close us again |
| 1020 | parent->OnQueryTextFinished(std::nullopt); |
| 1021 | } |
| 1022 | } |
| 1023 | |
| 1024 | this->Window::Close(); |
| 1025 | } |
| 1026 | }; |
| 1027 | |
| 1028 | static constexpr std::initializer_list<NWidgetPart> _nested_query_string_widgets = { |
no test coverage detected