fix issue of "After running Layout an all documents FoTT sometimes does not ends" (#723)
Co-authored-by: alex-krasn <64093224+alex-krasn@users.noreply.github.com> Co-authored-by: stew-ro <60453211+stew-ro@users.noreply.github.com>
This commit is contained in:
Родитель
ba04cebb63
Коммит
6203e2cd81
|
@ -187,8 +187,7 @@ export default class Canvas extends React.Component<ICanvasProps, ICanvasState>
|
|||
|
||||
public componentDidUpdate = async (prevProps: Readonly<ICanvasProps>, prevState: Readonly<ICanvasState>) => {
|
||||
// Handles asset changing
|
||||
if (this.props.selectedAsset.asset.name !== prevProps.selectedAsset.asset.name ||
|
||||
this.props.selectedAsset.asset.isRunningOCR !== prevProps.selectedAsset.asset.isRunningOCR
|
||||
if (this.props.selectedAsset.asset.name !== prevProps.selectedAsset.asset.name
|
||||
) {
|
||||
this.selectedRegionIds = [];
|
||||
this.imageMap.removeAllFeatures();
|
||||
|
@ -210,6 +209,10 @@ export default class Canvas extends React.Component<ICanvasProps, ICanvasState>
|
|||
await this.loadOcr();
|
||||
this.loadLabelData(asset);
|
||||
});
|
||||
} else if (this.props.selectedAsset.asset.isRunningOCR !== prevProps.selectedAsset.asset.isRunningOCR) {
|
||||
this.setState({
|
||||
currentAsset: this.props.selectedAsset
|
||||
});
|
||||
} else if (this.isLabelDataChanged(this.props, prevProps)
|
||||
|| (prevProps.project
|
||||
&& this.needUpdateAssetRegionsFromTags(prevProps.project.tags, this.props.project.tags))) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче