Fixed: it was possible to add the same Docker several times using General.Interface.AddDocker().

This commit is contained in:
MaxED 2014-10-09 19:29:17 +00:00
parent 76302375b9
commit 8b0f973b94
2 changed files with 2 additions and 1 deletions

View file

@ -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());

View file

@ -213,7 +213,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
{
// Clean up
General.Interface.RemoveDocker(undoredodocker);
General.Interface.RemoveDocker(drawingOverridesDocker); //mxd
undoredopanel.Dispose();
drawingOverridesPanel.Dispose(); //mxd