Skip to content

Commit

Permalink
fix : Resize was broken if 3d viewport displayed in HP (#4561)
Browse files Browse the repository at this point in the history
  • Loading branch information
salimkanoun authored Dec 2, 2024
1 parent 0a81ddb commit 878a1f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
// During a resize, the slice index should remain unchanged. This is a temporary fix for
// a larger issue regarding the definition of slice index with slab thickness.
// We need to revisit this to make it more robust and understandable.
delete presentation.viewReference.sliceIndex;
delete presentation.viewReference?.sliceIndex;
this.beforeResizePositionPresentations.set(viewportId, presentation);
});

Expand Down
2 changes: 1 addition & 1 deletion platform/ui/src/contextProviders/ViewportGridProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function ViewportGridProvider({ children, service }: ViewportGridProvider
updatedViewport?.viewportOptions
);

const displaySetOptions = updatedViewport.displaySetOptions || [];
const displaySetOptions = updatedViewport?.displaySetOptions || [];
if (!displaySetOptions.length) {
// Copy all the display set options, assuming a full set of displaySet UID's is provided.
if (state.isHangingProtocolLayout) {
Expand Down

0 comments on commit 878a1f8

Please sign in to comment.