summaryrefslogtreecommitdiffstats
path: root/sigscript/MapEffectWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sigscript/MapEffectWrapper.cpp')
-rw-r--r--sigscript/MapEffectWrapper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/sigscript/MapEffectWrapper.cpp b/sigscript/MapEffectWrapper.cpp
index c06d7c10..a8379407 100644
--- a/sigscript/MapEffectWrapper.cpp
+++ b/sigscript/MapEffectWrapper.cpp
@@ -24,9 +24,10 @@
Sigscript::MapEffectWrapper* Sigscript::MapEffectWrapper::create(const Sigmod::MapEffect* effect, MapWrapper* parent)
{
- if (!m_instances.contains(Signature(parent, effect->id())))
- m_instances[Signature(parent, effect->id())] = new MapEffectWrapper(effect, parent);
- return qobject_cast<MapEffectWrapper*>(m_instances[Signature(parent, effect->id())]);
+ Signature sig = Signature(parent, Subsignature(effect->className(), effect->id()));
+ if (!m_instances.contains(sig))
+ m_instances[sig] = new MapEffectWrapper(effect, parent);
+ return qobject_cast<MapEffectWrapper*>(m_instances[sig]);
}
Sigscript::MapEffectWrapper::MapEffectWrapper(const Sigmod::MapEffect* effect, MapWrapper* parent) :