fix(hp): Fails to display any layouts in the layout selector if first layout has multiple stages (#4058)
This commit is contained in:
parent
65d419dd52
commit
f0ed3fd7b9
@ -1034,6 +1034,7 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
|||||||
private performResize() {
|
private performResize() {
|
||||||
const isImmediate = false;
|
const isImmediate = false;
|
||||||
|
|
||||||
|
try {
|
||||||
const viewports = this.getRenderingEngine().getViewports();
|
const viewports = this.getRenderingEngine().getViewports();
|
||||||
|
|
||||||
// Store the current position presentations for each viewport.
|
// Store the current position presentations for each viewport.
|
||||||
@ -1056,6 +1057,10 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
|
|||||||
// Resize and render the rendering engine again.
|
// Resize and render the rendering engine again.
|
||||||
renderingEngine.resize(isImmediate);
|
renderingEngine.resize(isImmediate);
|
||||||
renderingEngine.render();
|
renderingEngine.render();
|
||||||
|
} catch (e) {
|
||||||
|
// This can happen if the resize is too close to navigation or shutdown
|
||||||
|
console.warn('Caught resize exception', e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private resetGridResizeTimeout() {
|
private resetGridResizeTimeout() {
|
||||||
|
|||||||
@ -1107,6 +1107,7 @@ export default class HangingProtocolService extends PubSubService {
|
|||||||
if (this.protocol.id !== protocolId) {
|
if (this.protocol.id !== protocolId) {
|
||||||
console.warn('setting protocol');
|
console.warn('setting protocol');
|
||||||
this.protocol = this.getProtocolById(protocolId);
|
this.protocol = this.getProtocolById(protocolId);
|
||||||
|
this.stageIndex = 0;
|
||||||
}
|
}
|
||||||
const protocol = this.protocol;
|
const protocol = this.protocol;
|
||||||
const stage = protocol.stages[stageIdx];
|
const stage = protocol.stages[stageIdx];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user