File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -259,9 +259,9 @@ bool MarkerPlacer::processModel(Model* aModel,
259
259
260
260
const auto avgRow = staticPoseTable.averageRow (_timeRange[0 ],
261
261
_timeRange[1 ]);
262
- for (size_t r = staticPoseTable.getNumRows () - 1 ; r > 0 ; --r )
262
+ for (size_t r = staticPoseTable.getNumRows (); r-- > 0 ; )
263
263
staticPoseTable.removeRowAtIndex (r);
264
- staticPoseTable.updRowAtIndex ( 0 ) = avgRow;
264
+ staticPoseTable.appendRow (_timeRange[ 0 ], avgRow) ;
265
265
266
266
OPENSIM_THROW_IF (!staticPoseTable.hasTableMetaDataKey (" Units" ),
267
267
Exception,
@@ -294,6 +294,7 @@ bool MarkerPlacer::processModel(Model* aModel,
294
294
295
295
// Construct the system and get the working state when done changing the model
296
296
SimTK::State& s = aModel->initSystem ();
297
+ s.updTime () = _timeRange[0 ];
297
298
298
299
// Create references and WeightSets needed to initialize InverseKinemaicsSolver
299
300
Set<MarkerWeight> markerWeightSet;
You can’t perform that action at this time.
0 commit comments