Skip to content

Commit 0d0e258

Browse files
pedrokohlerwayfarer3130
authored andcommitted
fix(defaultRouteInit): pass sorted display sets to hanging protocol for deterministic viewport order (#5933)
fix: pass sorted display sets to hanging protocol for deterministic viewport order The `applyHangingProtocol` function already sorts display sets by modality priority and series number into `sortedDisplaySets`, but the unsorted `displaySets` array was being passed to `hangingProtocolService.run()`. This caused non-deterministic viewport ordering across page loads because `displaySetService.getActiveDisplaySets()` returns display sets in creation order, which depends on asynchronous network responses. Made-with: Cursor
1 parent a6d9743 commit 0d0e258

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

platform/app/src/routes/Mode/defaultRouteInit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function defaultRouteInit(
4949

5050
// run the hanging protocol matching on the displaySets with the predefined
5151
// hanging protocol in the mode configuration
52-
hangingProtocolService.run({ studies, activeStudy, displaySets }, hangingProtocolId, {
52+
hangingProtocolService.run({ studies, activeStudy, displaySets: sortedDisplaySets }, hangingProtocolId, {
5353
stageIndex,
5454
});
5555
}

0 commit comments

Comments
 (0)