From 25ddb3e6e86f31079d69c5f9a92784742e2d0314 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Mon, 27 Nov 2023 04:44:54 -0800 Subject: [PATCH] simulate: Add states to history when stepping with right arrow key. PiperOrigin-RevId: 585613870 Change-Id: I7fb051946e8a91a900442e3d7048dfa8b8bd7c5c --- simulate/simulate.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simulate/simulate.cc b/simulate/simulate.cc index 676b1594..f1d27cf3 100644 --- a/simulate/simulate.cc +++ b/simulate/simulate.cc @@ -1566,9 +1566,10 @@ void UiEvent(mjuiState* state) { mjui0_update_section(sim, SECT_SIMULATION); } - // not in scrubber: step + // not in scrubber: step, add to history buffer else { mj_step(sim->m_, sim->d_); + sim->AddToHistory(); } UpdateProfiler(sim, sim->m_, sim->d_);