diff --git a/src/Add-on/Stretch.ts b/src/Add-on/Stretch.ts index a7be1b187..e15b84139 100644 --- a/src/Add-on/Stretch.ts +++ b/src/Add-on/Stretch.ts @@ -15,16 +15,9 @@ export class Stretch implements Command async exec(ss: SelectSet) { if (ss.SelectObjectList.length == 0) - { return; - } - app.m_Editor.m_CommandStore.commandPrompt = "请选择第一个拉伸点:"; - let p1 = await app.m_Editor.GetPoint({ Msg: "请选择第一个拉伸点:" }); if (p1.Status != PromptStatus.OK) return; - - app.m_Editor.m_CommandStore.commandPrompt = "请选择第二个拉伸点:"; - let data = this.parse(ss); for (let [obj] of data.str) app.m_Editor.AddNoSnapEntity(obj); diff --git a/src/Editor/GetPointServices.ts b/src/Editor/GetPointServices.ts index 986d4dda8..b1fe4cf6b 100644 --- a/src/Editor/GetPointServices.ts +++ b/src/Editor/GetPointServices.ts @@ -209,9 +209,11 @@ export class GetPointServices private initPrompt(prompt: GetPointPrompt) { + prompt.Msg = prompt.Msg || "请输入一个点:"; if (prompt.Msg) { app.m_Editor.m_CommandStore.commandPrompt = prompt.Msg; + app.m_Editor.m_CommandStore.Prompt(prompt.Msg); this.removeCalls.push(() => { app.m_Editor.m_CommandStore.commandPrompt = "";