Update terrain grid commitment logic and refine UI descriptions for grid settings

This commit is contained in:
2026-05-13 13:54:40 +02:00
parent 35b8b1d2db
commit b72aefe2fa

View File

@@ -10298,12 +10298,18 @@ export function App({
}); });
const terrainLabel = getTerrainLabelById(selectedTerrain.id, terrainList); const terrainLabel = getTerrainLabelById(selectedTerrain.id, terrainList);
commitTerrainChange( const committed = commitTerrainChange(
selectedTerrain, selectedTerrain,
nextTerrain, nextTerrain,
"Resize terrain grid", "Resize terrain grid",
`Resampled ${terrainLabel} to ${nextTerrain.sampleCountX} x ${nextTerrain.sampleCountZ} samples with ${nextTerrain.cellSize}m square cells.` `Updated ${terrainLabel} to ${nextTerrain.sampleCountX} x ${nextTerrain.sampleCountZ} samples with ${nextTerrain.cellSize}m square cells.`
); );
if (committed) {
setTerrainSampleCountXDraft(String(nextTerrain.sampleCountX));
setTerrainSampleCountZDraft(String(nextTerrain.sampleCountZ));
setTerrainCellSizeDraft(String(nextTerrain.cellSize));
}
} catch (error) { } catch (error) {
setStatusMessage(getErrorMessage(error)); setStatusMessage(getErrorMessage(error));
} }
@@ -21242,8 +21248,8 @@ export function App({
<div className="form-section"> <div className="form-section">
<div className="label">Grid Settings</div> <div className="label">Grid Settings</div>
<div className="material-summary"> <div className="material-summary">
Resizing keeps the terrain centered and resamples heights Cell Size changes resolution while preserving footprint.
and paint across the new grid. Samples X/Z extend or crop terrain size.
</div> </div>
<div className="vector-inputs"> <div className="vector-inputs">
<label className="form-field"> <label className="form-field">