| 704 | } |
| 705 | |
| 706 | void SimulationParametersMainWindow::onCenterLocation(int locationIndex) |
| 707 | { |
| 708 | auto parameters = _simulationFacade->getSimulationParameters(); |
| 709 | auto location = LocationHelper::findLocation(parameters, locationIndex); |
| 710 | RealVector2D pos; |
| 711 | if (std::holds_alternative<SimulationParametersZone*>(location)) { |
| 712 | auto zone = std::get<SimulationParametersZone*>(location); |
| 713 | pos = {zone->posX, zone->posY}; |
| 714 | } else { |
| 715 | auto source = std::get<RadiationSource*>(location); |
| 716 | pos = {source->posX, source->posY}; |
| 717 | } |
| 718 | Viewport::get().setCenterInWorldPos(pos); |
| 719 | } |
| 720 | |
| 721 | void SimulationParametersMainWindow::updateLocations() |
| 722 | { |
nothing calls this directly
no test coverage detected