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

This commit is contained in:
Salim Kanoun authored and GitHub committed 2023-12-13 14:47:12 -05:00
1 parent 7f0ca857fa
commit 9c6e1cd305
1 file changed
+3 -1
@@ -413,7 +413,7 @@ export default class HangingProtocolService extends PubSubService {
*
* @returns A boolean indicating whether a custom image load has been performed or not.
*/
public getCustomImageLoadPerformed(): boolean {
private getCustomImageLoadPerformed(): boolean {
return this.customImageLoadPerformed;
}
@@ -957,6 +957,8 @@ export default class HangingProtocolService extends PubSubService {
try {
if (!this.protocol || this.protocol.id !== protocol.id) {
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);
// before reassigning the protocol, we need to check if there is a callback