Skip to content

Commit 840a546

Browse files
authored
Merge pull request #654 from lixinghua123/alphaFix-lxh
fix: Scribble tool and cuboid tool display exception
2 parents 0dbfe8d + 2113f4a commit 840a546

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/lb-components/src/store/annotation

packages/lb-components/src/store/annotation/reducer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,8 @@ export const annotationReducer = (
496496

497497
annotationEngine?.launchOperation();
498498

499+
const isNoDataSourceTool = [EToolName.Cuboid, EToolName.ScribbleTool].includes(tool);
500+
499501
if (hasDataSourceStep) {
500502
if (stepBasicResultList?.length > 0) {
501503
annotationEngine?.setBasicInfo(dependStepConfig.tool, stepBasicResultList[basicIndex]);
@@ -508,7 +510,7 @@ export const annotationReducer = (
508510
}
509511

510512
// TODO,非查看模式才允许添加数据
511-
if (currentStepInfo.tool !== 'check' && hasDataSourceStep) {
513+
if (currentStepInfo.tool !== 'check' && (isNoDataSourceTool || hasDataSourceStep)) {
512514
const sourceID = stepBasicResultList[basicIndex]?.id ?? '';
513515
const resultForBasicIndex = hasDataSourceStep
514516
? result.filter((i: { sourceID: string | number }) =>

0 commit comments

Comments
 (0)