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
This commit is contained in:
parent
91a8715795
commit
68b10d365a
@ -49,7 +49,7 @@ export async function defaultRouteInit(
|
|||||||
|
|
||||||
// run the hanging protocol matching on the displaySets with the predefined
|
// run the hanging protocol matching on the displaySets with the predefined
|
||||||
// hanging protocol in the mode configuration
|
// hanging protocol in the mode configuration
|
||||||
hangingProtocolService.run({ studies, activeStudy, displaySets }, hangingProtocolId, {
|
hangingProtocolService.run({ studies, activeStudy, displaySets: sortedDisplaySets }, hangingProtocolId, {
|
||||||
stageIndex,
|
stageIndex,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user