| 356 | } |
| 357 | |
| 358 | void ReplaceList(DropDownList &&list, std::optional<int> selected_result) |
| 359 | { |
| 360 | this->list = std::move(list); |
| 361 | if (selected_result.has_value()) this->selected_result = *selected_result; |
| 362 | this->UpdateSizeAndPosition(); |
| 363 | this->ReInit(0, 0); |
| 364 | this->InitializePositionSize(this->position.x, this->position.y, this->nested_root->smallest_x, this->nested_root->smallest_y); |
| 365 | this->FindWindowPlacementAndResize(this->window_desc.GetDefaultWidth(), this->window_desc.GetDefaultHeight(), true); |
| 366 | this->SetDirty(); |
| 367 | } |
| 368 | }; |
| 369 | |
| 370 | void ReplaceDropDownList(Window *parent, DropDownList &&list, std::optional<int> selected_result) |
no test coverage detected