fix(hp): Display set should allow remembered updates (#4707)

This commit is contained in:
Bill Wallace authored and GitHub committed 2025-01-20 09:06:28 -05:00
1 parent 544dc543d9
commit 464148ece6
3 files changed
+18 -8

No files matched your search

@@ -680,7 +680,7 @@ export default class HangingProtocolService extends PubSubService {
}
// If the viewport options says to allow any instance, then we can assume
// it just updates this viewport
// it just updates this viewport. This is deprecated and will be removed
if (protocolViewport.viewportOptions.allowUnmatchedView) {
return defaultReturn;
}
@@ -692,7 +692,8 @@ export default class HangingProtocolService extends PubSubService {
protocolViewport.displaySets[0];
const displaySetSelector = protocol.displaySetSelectors[displaySetSelectorId];
if (!displaySetSelector) {
// The display set can allow any view
if (!displaySetSelector || displaySetSelector.allowUnmatchedView) {
return defaultReturn;
}
@@ -1352,9 +1353,7 @@ export default class HangingProtocolService extends PubSubService {
// Use the display set provided instead
if (reuseDisplaySetUID) {
if (viewportOptions.allowUnmatchedView !== true) {
this.validateDisplaySetSelectMatch(viewportDisplaySet, id, reuseDisplaySetUID);
}
// This display set should have already been validated
const displaySetInfo: HangingProtocol.DisplaySetInfo = {
displaySetInstanceUID: reuseDisplaySetUID,
displaySetOptions,
+13 -2
View File
@@ -134,6 +134,14 @@ export type ViewportStructure = {
*/
export type DisplaySetSelector = {
id?: string;
/**
* This can be set to true to allow unmatched views to replace a view showing this instance
* This is done at hte display set selector level to ensure that viewports sharing a display set
* don't get different values of allowUnmatchedView
*/
allowUnmatchedView?: boolean;
// The image matching rule (not currently implemented) selects which image to
// display initially, only for stack views.
imageMatchingRules?: MatchingRule[];
@@ -179,8 +187,11 @@ export type ViewportOptions = {
initialImageOptions?: CustomOption<initialImageOptions>;
syncGroups?: CustomOption<SyncGroup>[];
customViewportProps?: Record<string, unknown>;
// Set to true to allow non-matching drag and drop or options provided
// from options.displaySetSelectorsMap
/**
* Set to true to allow non-matching drag and drop or options provided
* from options.displaySetSelectorsMap
* @deprecated Moving to display set selector
*/
allowUnmatchedView?: boolean;
};