Fix(HPService): custom image load performed is now reset to false on HP exit (#3809)

This commit is contained in:
Salim Kanoun 2023-12-13 20:47:12 +01:00 committed by GitHub
parent 7f0ca857fa
commit 9c6e1cd305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,7 +413,7 @@ export default class HangingProtocolService extends PubSubService {
* *
* @returns A boolean indicating whether a custom image load has been performed or not. * @returns A boolean indicating whether a custom image load has been performed or not.
*/ */
public getCustomImageLoadPerformed(): boolean { private getCustomImageLoadPerformed(): boolean {
return this.customImageLoadPerformed; return this.customImageLoadPerformed;
} }
@ -957,6 +957,8 @@ export default class HangingProtocolService extends PubSubService {
try { try {
if (!this.protocol || this.protocol.id !== protocol.id) { if (!this.protocol || this.protocol.id !== protocol.id) {
this.stageIndex = options?.stageIndex || 0; this.stageIndex = options?.stageIndex || 0;
//Reset load performed to false to re-fire loading strategy at new study opening
this.customImageLoadPerformed = false;
this._originalProtocol = this._copyProtocol(protocol); this._originalProtocol = this._copyProtocol(protocol);
// before reassigning the protocol, we need to check if there is a callback // before reassigning the protocol, we need to check if there is a callback