From 6d717a06ea0753af611df4ad66068c4d13d8dad0 Mon Sep 17 00:00:00 2001 From: MaxED Date: Wed, 10 Jul 2013 09:57:30 +0000 Subject: [PATCH] Sector Edit form, Vertex Edit form: fixed another crash related to realtime update... --- Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs | 1 + Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs | 1 + .../Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs | 1 + Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs index 100f6a73..250519a9 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs @@ -626,6 +626,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Show realtime vertex edit dialog General.Interface.OnEditFormValuesChanged += new EventHandler(sectorEditForm_OnValuesChanged); General.Interface.ShowEditSectors(selected); + General.Interface.OnEditFormValuesChanged -= sectorEditForm_OnValuesChanged; // When a single sector was selected, deselect it now if(selected.Count == 1) diff --git a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs index 9528d15a..9078493f 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/VerticesMode.cs @@ -407,6 +407,7 @@ namespace CodeImp.DoomBuilder.BuilderModes //mxd. Show realtime vertex edit dialog General.Interface.OnEditFormValuesChanged += new EventHandler(vertexEditForm_OnValuesChanged); General.Interface.ShowEditVertices(selected); + General.Interface.OnEditFormValuesChanged -= vertexEditForm_OnValuesChanged; // When a single vertex was selected, deselect it now if(selected.Count == 1) General.Map.Map.ClearSelectedVertices(); diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs index 059e3ce3..a2a65c32 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySector.cs @@ -651,6 +651,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.OnEditFormValuesChanged += new System.EventHandler(Interface_OnEditFormValuesChanged); General.Interface.ShowEditSectors(sectors); + General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged; updateList.Clear(); updateList = null; diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs index 5a964b07..70cf928b 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualVertex.cs @@ -306,6 +306,7 @@ namespace CodeImp.DoomBuilder.BuilderModes General.Interface.OnEditFormValuesChanged += new System.EventHandler(Interface_OnEditFormValuesChanged); General.Interface.ShowEditVertices(verts, false); + General.Interface.OnEditFormValuesChanged -= Interface_OnEditFormValuesChanged; updateList.Clear(); updateList = null;