From 296b43f597e830c288ed0e56d1a6b78b955a7932 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 13 May 2013 02:15:48 +0200 Subject: Small adjustments to the floater module --- OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs | 2 +- OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs index 65c42ff..7684ce3 100644 --- a/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IDynamicFloaterModule.cs @@ -37,7 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces public abstract class FloaterData { public abstract int Channel { get; } - public abstract string FloaterName { get; } + public abstract string FloaterName { get; set; } public virtual string XmlName { get; set; } public virtual string XmlText { get; set; } public virtual HandlerDelegate Handler { get; set; } diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs index 4524a05..e76e8f2 100644 --- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs +++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicFloaterModule.cs @@ -122,6 +122,9 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport if (!m_floaters.ContainsKey(agentID)) m_floaters[agentID] = new Dictionary(); + if (m_floaters[agentID].ContainsKey(dialogData.Channel)) + return; + m_floaters[agentID].Add(dialogData.Channel, dialogData); string xml; @@ -218,7 +221,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport } } - if (data.Handler(client, data, parts)) + if (data.Handler != null && data.Handler(client, data, parts)) { m_floaters[client.AgentId].Remove(data.Channel); SendToClient(sp, String.Format("># floater {0} destroy", data.FloaterName)); -- cgit v1.1