Skip to content

Commit c64974f

Browse files
CopilotbedaHovorka
andauthored
Fix applyPreset: remove unnecessary clamping, set runner speed directly
Agent-Logs-Url: https://github.com/bedaHovorka/interlockSim/sessions/e9d0a748-c45e-4190-a083-8d04d829b60e Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
1 parent f70cdb6 commit c64974f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

desktop-ui/src/main/kotlin/cz/vutbr/fit/interlockSim/gui/SimulationControlPanel.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ class SimulationControlPanel : JPanel() {
137137
/** Apply a preset speed: update runner, slider, and label. */
138138
private fun applyPreset(speed: Double) {
139139
syncUiToSpeed(speed)
140-
// Update runner. If speed > MAX slider, clamp to MAX before writing runner.
141-
val clampedSpeed = speed.coerceIn(SimulationRunner.MIN_SPEED, SimulationRunner.MAX_SPEED)
142-
runner?.speedMultiplier = clampedSpeed
140+
runner?.speedMultiplier = speed
143141
}
144142

145143
/**

0 commit comments

Comments
 (0)