From c152c2905192e578ad4fc29f0e7777f804b7599b Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 18 Sep 2023 17:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9Aform=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E5=90=8E=E5=88=87=E6=8D=A2=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=90=8E=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlgraphic/app/JlDrawApp.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jlgraphic/app/JlDrawApp.ts b/src/jlgraphic/app/JlDrawApp.ts index 25ef784..78040c7 100644 --- a/src/jlgraphic/app/JlDrawApp.ts +++ b/src/jlgraphic/app/JlDrawApp.ts @@ -523,8 +523,12 @@ export class JlDrawApp extends GraphicApp implements IDrawApp { */ bindFormData(form: GraphicData): void { this.formData = form; - if (this.selectedGraphics.length == 1) { - this.formData.copyFrom(this.selectedGraphics[0].saveData()); + if (this.formData && this.selectedGraphics.length == 1) { + if (this.formData.graphicType == this.selectedGraphics[0].type) { + this.formData.copyFrom(this.selectedGraphics[0].saveData()); + } else { + this.formData = undefined; + } } }