diff --git a/src/DatabaseServices/Dimension/AlignedDimension.ts b/src/DatabaseServices/Dimension/AlignedDimension.ts index facf6ab21..11ea21de8 100644 --- a/src/DatabaseServices/Dimension/AlignedDimension.ts +++ b/src/DatabaseServices/Dimension/AlignedDimension.ts @@ -109,9 +109,9 @@ export class AlignedDimension extends Entity { this.UpdateText(); return [ - new Line(this.m_FootP1, this.m_ArmP1), - new Line(this.m_ArmP2, this.m_ArmP1), - new Line(this.m_ArmP2, this.m_FootP2), + new Line(this.m_FootP1.clone(), this.m_ArmP1.clone()), + new Line(this.m_ArmP2.clone(), this.m_ArmP1.clone()), + new Line(this.m_ArmP2.clone(), this.m_FootP2.clone()), this._Text.Clone() ].map(en => en.ApplyMatrix(this.OCS)); } @@ -238,7 +238,6 @@ export class AlignedDimension extends Entity { if (i >= 2) { - this.WriteAllObjectRecord(); let p = this.TextPosition.add(vec).applyMatrix4(this.OCSInv); let l = new Line(this.m_ArmP1, this.m_ArmP2); let cp = l.GetClosestPointTo(p, true); diff --git a/src/Debug/DebugObject.ts b/src/Debug/DebugObject.ts new file mode 100644 index 000000000..ee2c7f4a9 --- /dev/null +++ b/src/Debug/DebugObject.ts @@ -0,0 +1,17 @@ + + +export function DebugObject(object: T, listenKey: string): T +{ + return new Proxy(object, { + set: (target, key, value, receiver) => + { + if (Reflect.get(target, key, receiver) !== value) + { + if (key === listenKey) + { + } + } + return Reflect.set(target, key, value, receiver); + } + }); +} diff --git a/src/UI/Components/MainContent/Content.tsx b/src/UI/Components/MainContent/Content.tsx index 96d411909..173ce66ea 100644 --- a/src/UI/Components/MainContent/Content.tsx +++ b/src/UI/Components/MainContent/Content.tsx @@ -33,6 +33,9 @@ export class ContentComponent extends React.Component<{ store?: TopPanelStore; } { this.props.store.openMain = false; this.props.store.editoring = true; + let fid = localStorage.getItem('lastfid'); + if (fid) + (FileServer.GetInstance() as FileServer).OpenFile(fid); return; } await this.props.store.UpdateFileList();