Merge pull request #5751 from tsiegleauq/motion-to-motion-nav
Reset the CR Mode by motion-motion navigation
This commit is contained in:
commit
2943c969ab
@ -360,10 +360,15 @@ export class MotionDetailComponent extends BaseViewComponentDirective implements
|
|||||||
public lnMode: LineNumberingMode;
|
public lnMode: LineNumberingMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates the Change reco Mode.
|
* Indicates the current change reco mode.
|
||||||
*/
|
*/
|
||||||
public crMode: ChangeRecoMode;
|
public crMode: ChangeRecoMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates the default change reco mode.
|
||||||
|
*/
|
||||||
|
private defaultCrMode: ChangeRecoMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates the maximum line length as defined in the configuration.
|
* Indicates the maximum line length as defined in the configuration.
|
||||||
*/
|
*/
|
||||||
@ -544,7 +549,8 @@ export class MotionDetailComponent extends BaseViewComponentDirective implements
|
|||||||
.subscribe(mode => (this.lnMode = mode));
|
.subscribe(mode => (this.lnMode = mode));
|
||||||
this.configService.get<ChangeRecoMode>('motions_recommendation_text_mode').subscribe(mode => {
|
this.configService.get<ChangeRecoMode>('motions_recommendation_text_mode').subscribe(mode => {
|
||||||
if (mode) {
|
if (mode) {
|
||||||
this.crMode = this.determineCrMode(mode);
|
this.defaultCrMode = mode;
|
||||||
|
this.resetCrMode();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.configService
|
this.configService
|
||||||
@ -634,6 +640,10 @@ export class MotionDetailComponent extends BaseViewComponentDirective implements
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private resetCrMode(): void {
|
||||||
|
this.crMode = this.determineCrMode(this.defaultCrMode);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves
|
* Retrieves
|
||||||
*/
|
*/
|
||||||
@ -739,6 +749,7 @@ export class MotionDetailComponent extends BaseViewComponentDirective implements
|
|||||||
if (!this.editMotion) {
|
if (!this.editMotion) {
|
||||||
this.patchForm(this.motion);
|
this.patchForm(this.motion);
|
||||||
}
|
}
|
||||||
|
this.resetCrMode();
|
||||||
this.cd.markForCheck();
|
this.cd.markForCheck();
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user