fix: Execute HP onProtocolEnter callback after HPservice.run( (#4589)

This commit is contained in:
Salim Kanoun 2025-01-09 17:15:57 +01:00 committed by GitHub
parent 98f4ac2e75
commit 8e2c607904
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -406,15 +406,16 @@ export default class HangingProtocolService extends PubSubService {
if (protocolId && typeof protocolId === 'string') {
const protocol = this.getProtocolById(protocolId);
this._setProtocol(protocol, options);
return;
}else {
const matchedProtocol = this.protocolEngine.run({
studies: this.studies,
activeStudy,
displaySets,
});
this._setProtocol(matchedProtocol);
}
const matchedProtocol = this.protocolEngine.run({
studies: this.studies,
activeStudy,
displaySets,
});
this._setProtocol(matchedProtocol);
this._commandsManager.run(this.protocol?.callbacks?.onProtocolEnter);
}
/**