Fixes the initial loading of motions and their states

Fixes #4262
- If the workflow is changed, then the state of the motion will be updated, too
This commit is contained in:
GabrielMeyer 2019-02-06 12:08:55 +01:00
parent eab6e9bfd0
commit da94a4f947

View File

@ -405,6 +405,7 @@ export class ViewMotion extends BaseProjectableModel {
public updateWorkflow(workflow: Workflow): void { public updateWorkflow(workflow: Workflow): void {
if (this.motion && workflow.id === this.motion.workflow_id) { if (this.motion && workflow.id === this.motion.workflow_id) {
this._workflow = workflow; this._workflow = workflow;
this._state = workflow.getStateById(this.state_id);
} }
} }