From 8b0f973b94b4879b09c748520113c7a5a2a39701 Mon Sep 17 00:00:00 2001 From: MaxED Date: Thu, 9 Oct 2014 19:29:17 +0000 Subject: [PATCH] Fixed: it was possible to add the same Docker several times using General.Interface.AddDocker(). --- Source/Core/Windows/MainForm.cs | 2 ++ Source/Plugins/BuilderModes/General/BuilderPlug.cs | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Windows/MainForm.cs b/Source/Core/Windows/MainForm.cs index ec34b262..214b3ec3 100644 --- a/Source/Core/Windows/MainForm.cs +++ b/Source/Core/Windows/MainForm.cs @@ -3581,6 +3581,8 @@ namespace CodeImp.DoomBuilder.Windows // This adds a docker public void AddDocker(Docker d) { + if(dockerspanel.Contains(d)) return; //mxd + // Make sure the full name is set with the plugin name as prefix Plugin plugin = General.Plugins.FindPluginByAssembly(Assembly.GetCallingAssembly()); d.MakeFullName(plugin.Name.ToLowerInvariant()); diff --git a/Source/Plugins/BuilderModes/General/BuilderPlug.cs b/Source/Plugins/BuilderModes/General/BuilderPlug.cs index cad4cd7c..151aa143 100644 --- a/Source/Plugins/BuilderModes/General/BuilderPlug.cs +++ b/Source/Plugins/BuilderModes/General/BuilderPlug.cs @@ -213,7 +213,6 @@ namespace CodeImp.DoomBuilder.BuilderModes { // Clean up General.Interface.RemoveDocker(undoredodocker); - General.Interface.RemoveDocker(drawingOverridesDocker); //mxd undoredopanel.Dispose(); drawingOverridesPanel.Dispose(); //mxd