modify sim scale

This commit is contained in:
brige 2025-11-12 21:10:37 +08:00
parent cf52b345dc
commit d7ed79a4b4
2 changed files with 3 additions and 5 deletions

2
.gitignore vendored
View File

@ -5,5 +5,7 @@ thirdparty/
tritoin/
CMakeFiles/
logs/
doc/data/
doc/images/
QWEN.md
CMakeCache.txt

View File

@ -95,11 +95,7 @@ void Timestep::Start() {
return;
}
workSpace_->Begin();
// 重置速度为 1x 并通知 UI
auto it = std::find(speedLevels_.begin(), speedLevels_.end(), 1.0);
speedIndex_ = it != speedLevels_.end() ? int(std::distance(speedLevels_.begin(), it)) : speedIndex_;
currentStep_ = speedLevels_[speedIndex_];
emit StepChanged(currentStep_);
// 保持当前倍速,不在开始时重置为 1x
emit StatusChanged((int)playStatus_);
}