diff --git a/packages/tools/src/stateManagement/segmentation/internalAddSegmentationRepresentation.ts b/packages/tools/src/stateManagement/segmentation/internalAddSegmentationRepresentation.ts index 013988f1b..188aa751e 100644 --- a/packages/tools/src/stateManagement/segmentation/internalAddSegmentationRepresentation.ts +++ b/packages/tools/src/stateManagement/segmentation/internalAddSegmentationRepresentation.ts @@ -54,8 +54,8 @@ function internalAddSegmentationRepresentation( const segmentKeys = Object.keys(segmentation.segments); if (segmentKeys.length > 0) { firstSegmentIndex = segmentKeys.map((k) => Number(k)).sort()[0]; + setActiveSegmentIndex(segmentationId, firstSegmentIndex); } - setActiveSegmentIndex(segmentationId, firstSegmentIndex); } }