fix(ui): Use Transform3D.Identity instead of null after drag (v0.2.1)
Drag mode set BodyVisual.Transform = null when clearing the temporary offset on release. HelixToolkit Viewport3DHelper.GetTransform adds child.Transform to a GeneralTransform3DGroup without a null check, so the next FindHits after any drag threw ArgumentException and crashed. Clear the temporary transform with Transform3D.Identity instead. Root cause confirmed by decompiling HelixToolkit.Wpf GetTransform. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -323,6 +323,9 @@ NuGet 相依(自動還原):`CADability`、`HelixToolkit.Wpf`、`CommunityT
|
||||
|
||||
**驗收:** 大組件手形拖曳流暢;放開後干涉/量測結果與拖曳位置一致;右鍵視角操作不受影響
|
||||
|
||||
> v0.2.1 修正:拖曳放開時清除暫時位移誤用 `Transform = null`,導致下次 `FindHits` 命中該檔案時
|
||||
> HelixToolkit `GetTransform` 對 null transform `Add` 而 crash。改用 `Transform3D.Identity`。
|
||||
|
||||
---
|
||||
|
||||
## Future Extensions(下一輪)
|
||||
|
||||
Reference in New Issue
Block a user