Skip to content

Commit 4383e9c

Browse files
committed
Fix simulation plot scrubbing not continuously updating simulation time (#1139)
1 parent 60f1198 commit 4383e9c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
## [Upcoming Release]
88

99
- Added "Total Length" as an option in the muscle plot panel (#1141)
10+
- Fixed a regression in the simulation workflow where clicking and dragging
11+
the mouse over a simulation plot was no longer continuously scrubbing through
12+
the simulation (#1139).
1013

1114

1215
## [0.6.2] - 2025/11/03

libopensimcreator/UI/Simulation/SimulationOutputPlot.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ class osc::SimulationOutputPlot::Impl final {
249249
plot::pop_style_var();
250250
plot::pop_style_var();
251251
}
252+
bool plotIsHovered = ui::is_item_hovered(ui::HoveredFlag::AllowWhenOverlapped);
252253

253254
// if the user right-clicks, draw a context menu
254255
TryDrawOutputContextMenuForLastItem(*m_API, sim, m_OutputExtractor);
@@ -277,7 +278,7 @@ class osc::SimulationOutputPlot::Impl final {
277278
drawlist.add_line(p1, p2, currentTimeLineColor);
278279
}
279280

280-
if (ui::is_item_hovered()) {
281+
if (plotIsHovered) {
281282
const Vector2 mp = ui::get_mouse_ui_position();
282283
const Vector2 plotLoc = mp - plotRect.ypd_top_left();
283284
const float relLoc = plotLoc.x / plotRect.width();

0 commit comments

Comments
 (0)