MCPcopy Create free account
hub / github.com/chrxh/alien / processCenterOnSelection

Method processCenterOnSelection

source/Gui/SpatialControlWindow.cpp:131–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void SpatialControlWindow::processCenterOnSelection()
132{
133 if (_centerSelection && _simulationFacade->isSimulationRunning()) {
134 auto shallowData = _simulationFacade->getSelectionShallowData();
135 if (shallowData.numCells > 0 || shallowData.numParticles > 0) {
136 Viewport::get().setCenterInWorldPos({shallowData.centerPosX, shallowData.centerPosY});
137 }
138 }
139}

Callers

nothing calls this directly

Calls 3

setCenterInWorldPosMethod · 0.80
isSimulationRunningMethod · 0.45

Tested by

no test coverage detected